-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
132 lines (98 loc) · 3.75 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
130
131
132
set-option -g default-shell /bin/zsh
set-option -s escape-time 10
new-session -n $HOST
set-window-option -g mode-keys vi
set -g prefix2 C-a # GNU-Screen compatible prefix
bind C-a send-prefix -2
set -g history-limit 100000 # boost history
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'laktak/extrakto'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# reload configuration
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# nice splits
bind c new-window -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind _ split-window -h -c "#{pane_current_path}"
unbind '"'
unbind %
# pane navigation
bind h select-pane -L # move left
bind j select-pane -D # move down
bind k select-pane -U # move up
bind l select-pane -R # move right
# pane navigation
unbind u
unbind i
unbind o
bind u select-layout main-vertical
bind i select-layout main-horizontal
bind o select-layout tiled
# unbind n
# unbind p
bind C-n swap-pane -D # swap current pane with the next one
bind C-p swap-pane -U # swap current pane with the previous one
# window navigation
unbind q
bind C-h previous-window # select previous window
bind C-l next-window # select next window
bind q kill-window
bind < swap-window -t -1
bind > swap-window -t +1
# break and join panes easily
unbind p
bind p command-prompt -p "join pane from:" "join-pane -s '%%'" # join pane from
bind C-p command-prompt -p "send pane to:" "join-pane -t '%%'" # join pane to
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
# statusbar
set -g status-justify left
set -g status-left ''
set -g status-right ''
set -g status-right '#(hostname)'
set -g status-right-length 50
set -g status-left-length 0
# messages
set -g message-style bg=colour16,fg=colour232,bold
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-style bg=black,fg=yellow,default
# default window title colors
set-window-option -g window-status-style fg=brightblue,bg=default,dim
# active window title colors
setw -g window-status-format '#I:#W'
set-window-option -g window-status-current-style fg=brightred,bg=default
# pane border
set-option -g pane-border-style fg=black #base02
set-option -g pane-active-border-style fg=brightgreen #base01
# message text
set-option -g message-style bg=black,fg=brightred
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
set-option -g status-interval 1
set-option -g automatic-rename on
#set-option -g automatic-rename-format '#{b:pane_current_path}'
set-window-option -g window-status-current-format '#[fg=red,bold]*#[fg=white,bold]#{window_index} #[fg=blue]#(echo "#{pane_current_path}" | rev | cut -d'/' -f-1 | rev)'
set-window-option -g window-status-format '#[fg=white,bold]#{window_index} #[fg=blue]#(echo "#{pane_current_path} " | rev | cut -d'/' -f-1 | rev)'