-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
184 lines (145 loc) · 6.34 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# ==================== Base ====================
set -g prefix ^a
unbind ^b
bind a send-prefix
set -g base-index 1
set-option -g default-terminal 'tmux-256color'
set-option -sa terminal-features ',xterm*:RGB'
set-option -sa terminal-features ',xterm*:Tc'
set -g @plugin 'Morantron/tmux-fingers'
set -g @fingers-keyboard-layout "colemak"
set -g @fingers-highlight-style "fg=red"
set -g @fingers-hint-style "fg=blue, bold"
# To prevent c-d existing from shell
set-environment -g 'IGNOREEOF' 3
# =================== Mouse =======================
set -g mouse on
# ==================== Theme ======================
# --> Catppuccin (Mocha)
thm_bg="#11111b"
thm_fg="#cdd6f4"
thm_cyan="#89dceb"
thm_black="#181825"
thm_gray="#45475a"
thm_magenta="#cba6f7"
thm_pink="#f5c2e7"
thm_red="#f38ba8"
thm_green="#a6e3a1"
thm_yellow="#f9e2af"
thm_blue="#89b4fa"
thm_orange="#fab387"
thm_black4="#585b70"
# ==================== Plugins ====================
# == Tmux Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
# == Basic tmux settings everyone can agree on
set -g @plugin 'tmux-plugins/tmux-sensible'
# == Tmux plugin for copying to system clipboard.
#
# prefix + y - copy selection to system clipboard
# prefix + Y - "put" selection - equivalent to copying a selection, and pasting it to the command line
# set -g @plugin 'tmux-plugins/tmux-yank'
set -s set-clipboard on
# == Plugin wrapper around Facebook PathPicker. Quickly open any path on your temrinal window in your $EDITOR of choice!
#
# prefix + f - "fpp" for a new window with a Facebook PathPicker selection of your tty.
# set -g @plugin 'tmux-plugins/tmux-fpp'
# set -g @fpp-key 'f'
# == Tmux key bindings for quick opening of a highlighted file or url. In tmux copy mode:
#
# prefix + o - "open" a highlighted selection with the system default program. open for OS X or xdg-open for Linux.
# prefix + c-o - open a highlighted selection with the $EDITOR
# set -g @plugin 'tmux-plugins/tmux-open'
# == A sidebar with the directory tree for the current path. Tries to make tmux more IDE like.
#
# prefix + Tab - toggle sidebar with a directory tree
# prefix + Backspace - toggle sidebar and move cursor to it (focus it)
set -g @plugin 'tmux-plugins/tmux-sidebar'
# == Standard pane key-bindings for tmux
set -g @plugin 'tmux-plugins/tmux-pain-control'
set-option -g @pane_resize "10"
# == Battery & Online status
# set -g @plugin 'tmux-plugins/tmux-battery'
# set -g @plugin 'tmux-plugins/tmux-online-status'
# set -g @batt_remain_short true
# set-option -g @nord_tmux_light "0"
# set -g @plugin "arcticicestudio/nord-tmux"
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @prefix_highlight_show_copy_mode "on"
# Enable 256 color support
# set -g default-terminal "xterm-256color"
# The statusbar
set -g status on
bind F1 set status
bind-key c-b set-option -g status
set -g status-justify centre
set -g status-interval 2
set -g status-position bottom
set -g status-style bg=default,fg=default,none
set -g status-left-length 50
set -g status-right-length 60
set -g @prefix_highlight_fg $thm_cyan
set -g @prefix_highlight_bg $thm_red
set -g @prefix_highlight_copy_mode_attr "fg=$thm_cyan,bg=$thm_magenta"
set -g @prefix_highlight_sync_mode_attr "fg=$thm_cyan,bg=$thm_magenta"
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_show_sync_mode 'on'
set -g @prefix_highlight_prefix_prompt ''
set -g @prefix_highlight_copy_prompt ''
set -g @prefix_highlight_sync_prompt ''
set -g status-left " #[fg=$thm_black4,bg=$thm_bg]#[fg=$thm_cyan,bg=$thm_black4]#{prefix_highlight}#[fg=$thm_cyan,bg=$thm_black4] #S | #h #[fg=$thm_black4, bg=$thm_bg] "
set -g status-right " #[fg=$thm_black4,bg=$thm_bg]#[fg=$thm_cyan,bg=$thm_black4] %d-%b-%y | #(gitmux -cfg $HOME/.config/gitmux.conf '#{pane_current_path}')#[fg=$thm_black4,bg=$thm_bg] "
setw -g window-status-separator ' '
setw -g window-status-current-format "#[fg=$thm_green,bg=$thm_bg]#[bg=$thm_green]#[fg=$thm_black,bg=$thm_green,none] #I:#[fg=$thm_black,bg=$thm_green] #W #[fg=$thm_green,bg=$thm_bg]"
setw -g window-status-format "#{?window_activity_flag,#[bg=colour9],#[bg=default]}#[fg=$thm_black4]#{?window_activity_flag,#[fg=$thm_cyan],#[fg=$thm_cyan]}#[bg=$thm_black4] #I:#{?window_activity_flag,#[fg=$thm_cyan],#[fg=$thm_cyan]} #W #{?window_activity_flag,#[bg=$thm_bg],#[bg=$thm_bg]}#[fg=$thm_black4]"
# EXTRA THEME STUFF
# messages
set -g message-style fg="${thm_cyan}",bg="${thm_gray}",align="centre"
set -g message-command-style fg="${thm_cyan}",bg="${thm_gray}",align="centre"
# panes
set -g pane-border-style fg="${thm_gray}"
set -g pane-active-border-style fg="${thm_blue}"
# windows
setw -g window-status-activity-style fg="${thm_fg}",bg="${thm_bg}",none
setw -g window-status-separator " "
setw -g window-status-style fg="${thm_fg}",bg="${thm_bg}",none
# --------=== Modes
setw -g clock-mode-colour "${thm_blue}"
setw -g mode-style "fg=${thm_pink} bg=${thm_black4} bold"
# Enable 24-bit "True color" support
# set-option -ga terminal-overrides ",xterm-256color:Tc"
# Undercurl
# set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# == Persists tmux environment across system restarts.
#
# prefix + c-s - save
# prefix + c-r - restore
set -g @plugin 'tmux-plugins/tmux-resurrect'
# == Continuous saving of tmux environment. Automatic restore when tmux is started. Automatic tmux start when computer is turned on.
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @resurrect-strategy-nvim 'session'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '2'
# ==================== Bindings ====================
# Override tmux-pain-control key-bindings
bind ^k resizep -U 10
bind ^j resizep -D 10
bind ^h resizep -L 10
bind ^l resizep -R 10
bind ^u swapp -U
bind ^d swapp -D
# bind \ last
bind q killp
bind ` splitw "gotop -c monokai"
bind m command-prompt "splitw 'exec man %%'"
bind / command-prompt "splitw '%%'"
# To enable true colors
# https://chris.chowie.net/2015/04/19/True-colour-with-neovim-tmux-and-iterm2/
# == Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
if-shell '[ $(uname -s) = Linux ]' {
set -g default-command 'fish'
}