Mercurial > dotfiles
annotate dot_tmux.conf @ 357:faf583aae0f4
Fix indent blankline color
Default is using comment, which is italized
author | Zeger Van de Vannet <zegervdv@me.com> |
---|---|
date | Tue, 02 Mar 2021 09:23:11 +0100 |
parents | 44442a6b8aa6 |
children | ce08bc71b455 |
rev | line source |
---|---|
257 | 1 set-environment -g PATH "/project/asic_fpga/tools/tmux/bin:$PATH" |
2 | |
3 # Nested TMUX sessions (from | |
4 # https://medium.freecodecamp.org/tmux-in-practice-local-and-nested-remote-tmux-sessions-4f7ba5db8795) | |
348
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
5 bind -T root F11 \ |
257 | 6 set prefix None \;\ |
7 set key-table off \;\ | |
8 set status-right "#[fg=colour0,bg=colour1] DISABLED #[fg=colour3,bg=colour0] #{session_name}#[fg=colour1] | #[fg=colour2]%d %b %l:%M %p " | |
9 refresh-client -S \;\ | |
10 | |
348
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
11 bind -T off F11 \ |
257 | 12 set -u prefix \;\ |
13 set -u key-table \;\ | |
14 set -u status-right \;\ | |
15 refresh-client -S | |
16 # improve colors | |
355
44442a6b8aa6
Set the smso option to make italics work in tmux
zegervdv <zegervdv@me.com>
parents:
348
diff
changeset
|
17 set -g default-terminal 'tmux-256color' |
44442a6b8aa6
Set the smso option to make italics work in tmux
zegervdv <zegervdv@me.com>
parents:
348
diff
changeset
|
18 set -as terminal-overrides ',xterm*:Tc:smso=\E[3m' |
44442a6b8aa6
Set the smso option to make italics work in tmux
zegervdv <zegervdv@me.com>
parents:
348
diff
changeset
|
19 set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' |
257 | 20 set-option -g allow-rename off |
21 set-window-option -g automatic-rename off | |
22 | |
23 # Status bar | |
24 set -g set-titles 'off' | |
25 set -g status-position 'top' | |
26 set -g status-left "" | |
27 set -g status-right-length 200 | |
268 | 28 set -g status-right "#[fg=colour0,bg=colour5] vsim #[fg=colour0,bg=colour15] #(ps hux -u $(whoami) | grep 'vish' | grep -v -E 'grep|view' | wc -l) #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour3] load #[fg=colour0,bg=colour15] #(cat /proc/loadavg | awk '{ print $3; }' | xargs printf '%2.2f') #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour2] mem #[fg=colour0,bg=colour15] #(ps haux | awk -v user=$(whoami) '$1 ~ user { sum += $4 } END { print sum; }' | xargs printf '%2.2f')% #[fg=colour3,bg=colour0] #[fg=colour0,bg=colour1] time #[fg=colour0,bg=colour15] %d %b %l:%M %p #[fg=colour3,bg=colour0] #[fg=colour15,bg=colour8] #{session_name} #[fg=colour0,bg=colour0] " |
257 | 29 |
30 # Tabs | |
31 setw -g window-status-format " #I #W " | |
32 setw -g window-status-style fg=colour15 | |
33 setw -g window-status-current-format " #I #W " | |
34 setw -g window-status-current-style fg=red | |
35 | |
36 set -g status-justify "left" | |
37 set -g status-bg "colour0" | |
38 set -g status-fg "colour7" | |
348
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
39 # set -g message-bg "colour0" |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
40 # set -g message-fg "colour8" |
257 | 41 |
42 setw -g window-status-bell-style "fg=colour0,bg=colour5" | |
43 | |
44 bind s split-window -v -c "#{pane_current_path}" | |
45 bind v split-window -h -c "#{pane_current_path}" | |
46 bind a split-window -v -p 15 -c "#{pane_current_path}" | |
47 # bind c new-window -c "#{pane_current_path}" | |
48 bind c command-prompt -p "Name:" "new-window -c \"#{pane_current_path}\" -n %%" | |
49 | |
50 # Enable delete in command sequencer | |
51 bind h send-keys 'c-h' | |
52 | |
53 # Open man pages in split | |
54 bind @ command-prompt -p "Man:" "split-window -v 'exec man %%'" | |
55 | |
56 # act like vim | |
57 bind Escape copy-mode | |
58 set-window-option -g mode-keys vi | |
59 bind-key -T copy-mode-vi 'v' send -X begin-selection | |
60 bind-key -T copy-mode-vi 'V' send -X select-line | |
61 bind-key -T copy-mode-vi 'r' send -X rectangle-toggle | |
62 bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' | |
63 unbind-key -T copy-mode-vi MouseDragEnd1Pane | |
64 unbind -T copy-mode-vi MouseDragEnd1Pane | |
65 # unbind -t vi-copy MouseDragEnd1Pane | |
66 | |
67 # Smart pane switching with awareness of Vim splits. | |
68 # See: https://github.com/christoomey/vim-tmux-navigator | |
69 is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | |
70 | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | |
348
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
71 bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
72 bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
73 bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
74 bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
75 tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
76 if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
77 "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
78 if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
79 "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
80 |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
81 bind-key -T copy-mode-vi 'C-h' select-pane -L |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
82 bind-key -T copy-mode-vi 'C-j' select-pane -D |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
83 bind-key -T copy-mode-vi 'C-k' select-pane -U |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
84 bind-key -T copy-mode-vi 'C-l' select-pane -R |
f220567b278e
Update tmux-vim mapping
Zeger Van de Vannet <zegervdv@me.com>
parents:
297
diff
changeset
|
85 bind-key -T copy-mode-vi 'C-\' select-pane -l |
257 | 86 #act like GNU screen |
87 unbind C-b | |
88 set -g prefix C-Space | |
89 bind Space send-prefix | |
90 set -g escape-time 20 | |
91 | |
92 # start window numbers at 1 to match keyboard order with tmux window order | |
93 set -g base-index 1 | |
94 | |
95 # renumber windows sequentially after closing any of them | |
96 set -g renumber-windows on | |
97 | |
98 bind-key r source ~/.tmux.conf | |
99 | |
100 # Fix hightlighting in less | |
101 set -ga terminal-overrides ',*:sitm@,ritm@' | |
102 | |
103 # increase scrollback lines | |
104 set -g history-limit 100000 | |
105 | |
106 setw -g mouse on | |
107 | |
108 set -g focus-events on | |
109 | |
110 # Allow for visual bell when a command completes | |
111 set-window-option -g visual-bell on | |
112 set-window-option -g bell-action other | |
113 | |
114 set-option -g default-shell "/bin/bash" | |
115 # set-option -g default-command "/bin/bash" | |
116 # set-environment -g SHELL "/bin/bash" | |
117 # set-environment -g PATH "$PATH:/home/zvandeva/bin" | |
118 | |
119 # Local config | |
120 if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' | |
121 | |
122 # Plugins | |
123 set -g @plugin 'tmux-plugins/tpm' | |
124 set -g @plugin 'nhdaly/tmux-better-mouse-mode' | |
125 set -g @plugin 'tmux-plugins/tmux-yank' | |
126 set -g @plugin 'Morantron/tmux-fingers' | |
127 set -g @plugin 'laktak/extrakto' | |
128 set -g @plugin 'tmux-plugins/tmux-resurrect' | |
129 set -g @plugin 'tmux-plugins/tmux-continuum' | |
130 | |
131 | |
132 # Config | |
133 set -g @fingers-skip-health-check '1' | |
134 set -g @fingers-compact-hints '0' | |
135 set -g @fingers-hint-format-nocompact " #[fg=colour1][%s]" | |
136 set -g @fingers-highlight-format-nocompact "#[fg=colour5]%s" | |
137 set -g @fingers-pattern-0 "[[:digit:]][[:digit:]][[:digit:]]+" | |
138 | |
139 set -g @scroll-without-changing-pane "on" | |
140 set -g @emulate-scroll-for-no-mouse-alternate-buffer "on" | |
141 | |
142 set -g @extrakto_fzf_tool "/home/zvandeva/.fzf/bin/fzf" | |
143 | |
144 set -g @resurrect-strategy-nvim 'session' | |
145 set -g @resurrect-capture-pane-contents 'on' | |
146 | |
147 run-shell "~/.tmux/plugins/tpm/tpm" |