-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
95 lines (73 loc) · 2.27 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# set colors
set -g default-terminal "screen-256color"
# set the base index for windows to 1
set -g base-index 1
# set the base index for panes to 1
set -g pane-base-index 1
# set prefix
set-option -g prefix C-a
unbind C-b
bind C-a send-prefix
# split windows with with Ctrl + a | and _
unbind %
bind | split-window -h
bind _ split-window -v
# I use vim
setw -g mode-keys vi
set-option -g status-keys vi
#set-window-option -g utf8 on
set-option -g history-limit 8000
# set window list
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H: #[fg=yellow]#S'
set -g status-left-length 40
# set right status bar content
#set -g status-right '#[fg=green]#(~/.tmux/battery Charging)#[fg=red]#(~/.tmux/battery Discharging) | #[fg=yellow]#(date +"%A %F %R")'
set -g status-right '#[fg=yellow]#(date +"%A %F %R")'
set -g status-interval 60
# Highlight active window
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-fg black
# Agressive resize
setw -g aggressive-resize on
# Activity Monitoring
setw -g monitor-activity on
set -g visual-activity on
# center the window list
set -g status-justify centre
bind P pipe-pane -o "cat >/tmp/#W.log" \; display "Toggled logging to /tmp/#W.log"
# rebind copy and paste mode to be more vim-like
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Fix nvim problem with special characters
set -s escape-time 0
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Pane resizing
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Source this file
bind -r C-r source-file ~/.tmux.conf
# Change colors of the status bar
source-file ~/.tmux/solarized-light.conf
set-option -g default-shell /bin/zsh
# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Default terminal is 256 colors
set -g default-terminal "screen-256color"