-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtmux.conf
101 lines (81 loc) · 3.24 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
96
97
98
99
100
101
# .tmux.conf
# Sherif Soliman
# Use vim keybindings in copy mode
set -g mode-keys vi
# set timeout to 0 to eliminate ESC delay in vim
# reference: https://www.johnhawthorn.com/2012/09/vi-escape-delays/
set -s escape-time 0
# Set up 'v' to begin selection as in Vim
# updated 2017-04-20
# per https://github.com/tmux/tmux/issues/592#issuecomment-255763680
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
# bind Ctrl-Z to zoom
bind-key -n C-z resize-pane -Z
# improve colors
set -g default-terminal "xterm-kitty"
# set-option -ga terminal-overrides ",xterm-256color:Tc"
# aesthetics
set -g pane-border-bg '#282a36'
set -g pane-border-fg '#282a36'
set -g pane-active-border-bg '#282a36'
set -g pane-active-border-fg '#26F1FA' # neon blue
# more aesthetics and options
set -g visual-activity on
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l
# (Thanks to Trey Causey for these)
# windows
# # center window list for clarity
set -g status-justify centre
# visual notification of activity off
setw -g monitor-activity off
# set window list colors
set-window-option -g window-status-fg '#6272a4'
set-window-option -g window-status-attr dim
set-window-option -g window-status-current-fg '#50fa7b'
set-window-option -g window-status-current-attr dim
# format window title
setw -g window-status-format " #I. #W "
setw -g window-status-current-format " #I. #W "
# status bar colors and segments
set -g status-bg "#282a36"
set -g status-fg "#6272a4"
setw -g window-status-bg "#282a36"
setw -g window-status-current-bg "#282a36"
# session name on left
set -g status-left '#S'
# load avs ∙ today tasks ∙ hostname on right
set -g status-right-length 100
set -g status-right "\
#{?#(cat ~/mytasks/tasks.txt | grep '@now' | wc -l | sed -e's/ *//'),#[italics]#[fg=#64222c]#[bg=#ff5555],#[default]} now #[default]#[noitalics]\
#{?#(cat ~/mytasks/tasks.txt | grep '@today' | wc -l | sed -e's/ *//'),#[italics]#[fg=#fb556e],#[default]} \
#(cat ~/mytasks/tasks.txt | grep '@today' | wc -l | sed -e's/ *//') today#[fg=default]#[noitalics] ∙ \
#(sysctl -n vm.loadavg | sed -e 's/{//g;s/}//g;s/^ *//g;s/ $//g') ∙ \
#(hostname)"
set-window-option -g mode-fg white
set-window-option -g mode-bg "#0494B4"
# Turn on window titles
set -g set-titles on
# Set window title string
# #H Hostname of local host
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current window title
# #W Current window name
# # A literal ‘#’
set -g set-titles-string '#S (#W) @ #H '