-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
129 lines (96 loc) · 3.5 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# general
set -g default-terminal ${TERM}
set -g default-shell ${SHELL}
setw -g xterm-keys on
set -s escape-time 10
set -sg repeat-time 600
set -s focus-events on
# change to ctrl-a
unbind C-b
set -g prefix C-a
# send ctrl-a on ctrl-a + a
bind a send-prefix
set -q -g status-utf8 on
setw -q -g utf8 on
set -g history-limit 15000
# vi-like keys
setw -g mode-keys vi
# edit configuration
bind e new-window -n "~/.tmux.conf" "sh -c '\${EDITOR:-vim} ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'"
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
# display
setw -g automatic-rename on
set -g renumber-windows on
set -g set-titles on
set -g status-interval 10
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# navigation
unbind-key C-c # do not want accidental new-sessions
bind C-f command-prompt -p find-session 'switch-client -t %%'
bind - split-window -v
bind _ split-window -h
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# maximize current pane
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D'
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind -r C-h previous-window
bind -r C-l next-window
bind -r C-b last-window
bind -r C-a last-window
bind Enter copy-mode
# buffers
bind b list-buffers
bind p paste-buffer
bind P choose-buffer
# temp local fixes
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
# theming
tmux_conf_theme_left_separator_main='\uE0B0'
tmux_conf_theme_left_separator_sub='\uE0B1'
tmux_conf_theme_right_separator_main='\uE0B2'
tmux_conf_theme_right_separator_sub='\uE0B3'
## COLORSCHEME: gruvbox dark
set-option -g status "on"
# default statusbar color
set-option -g status-style fg=green # bg=bg1, fg=fg1
set-window-option -g window-status-style fg=colour240 # bg=yellow, fg=bg1
set-window-option -g window-status-last-style fg=blue # bg=yellow, fg=bg1
set-window-option -g window-status-activity-style fg=red # bg=bg1, fg=fg3
set-window-option -g window-status-current-style fg=colour223 # fg=bg1
set-option -g pane-active-border-style fg=colour250 #fg2
set-option -g pane-border-style fg=colour237 #bg1
set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
set-option -g display-panes-active-colour colour250 #fg2
set-option -g display-panes-colour colour237 #bg1
set-window-option -g clock-mode-colour colour109 #blue
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
## theme+color
set-option -g status-position bottom
set-option -g status-justify centre
set-option -g status-left-style none
set-option -g status-left-length "80"
set-option -g status-right-style none
set-option -g status-right-length "80"
set-window-option -g window-status-separator ""
set-option -g status-left "[ #[fg=blue]#S#[fg=green] ]["
set-option -g status-right "][ #[fg=blue]%d-%m-%Y %H:%M #[fg=green]]"
set-window-option -g window-status-current-format " (#I*#W)"
set-window-option -g window-status-format " (#I #W)"