diff options
Diffstat (limited to 'tmux/tmux.conf')
-rw-r--r-- | tmux/tmux.conf | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..1ddc877 --- /dev/null +++ b/tmux/tmux.conf | |||
@@ -0,0 +1,90 @@ | |||
1 | new-session # Start a new session if none available | ||
2 | |||
3 | # tty | ||
4 | set -g default-terminal "tmux-256color" | ||
5 | set -ag terminal-overrides ",xterm-256color:RGB" | ||
6 | set -sg escape-time 0 | ||
7 | set -gw xterm-keys on | ||
8 | |||
9 | # prefix | ||
10 | unbind C-b | ||
11 | set -g prefix C-g | ||
12 | |||
13 | # Tab key | ||
14 | bind-key -nr C-_ send-keys C-/ | ||
15 | |||
16 | # status bar | ||
17 | set-window-option -g window-status-current-style fg=black,bg=yellow | ||
18 | |||
19 | |||
20 | bind N new-session | ||
21 | bind-key -n C-F3 set -g status #Ctrl+F3 Combo | ||
22 | |||
23 | bind k copy-mode | ||
24 | bind-key T swap-window -t 0 | ||
25 | |||
26 | # config | ||
27 | bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." | ||
28 | |||
29 | # layout | ||
30 | bind C-q select-layout even-horizontal | ||
31 | bind C-w select-layout even-vertical | ||
32 | bind C-e select-layout main-horizontal | ||
33 | bind C-r select-layout main-vertical | ||
34 | |||
35 | # color | ||
36 | # Feel free to NOT use this variables at all (remove, rename) | ||
37 | # this are named colors, just for convenience | ||
38 | color_orange="colour166" # 208, 166 | ||
39 | color_purple="colour134" # 135, 134 | ||
40 | color_green="colour076" # 070 | ||
41 | color_blue="colour39" | ||
42 | color_yellow="colour220" | ||
43 | color_red="colour160" | ||
44 | color_black="colour232" | ||
45 | color_white="white" # 015 | ||
46 | |||
47 | # This is a theme CONTRACT, you are required to define variables below | ||
48 | # Change values, but not remove/rename variables itself | ||
49 | color_dark="$color_black" | ||
50 | color_light="$color_white" | ||
51 | color_session_text="$color_blue" | ||
52 | color_status_text="colour245" | ||
53 | color_main="$color_orange" | ||
54 | color_secondary="$color_purple" | ||
55 | color_level_ok="$color_green" | ||
56 | color_level_warn="$color_yellow" | ||
57 | color_level_stress="$color_red" | ||
58 | color_window_off_indicator="colour088" | ||
59 | color_window_off_status_bg="colour238" | ||
60 | color_window_off_status_current_bg="colour254" | ||
61 | |||
62 | # nested tmux | ||
63 | |||
64 | #bind -T root S-F12 \ | ||
65 | # set prefix None \;\ | ||
66 | # set key-table off \;\ | ||
67 | # set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\ | ||
68 | # set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\ | ||
69 | # set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\ | ||
70 | # if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ | ||
71 | # refresh-client -S \;\ | ||
72 | |||
73 | bind -T root F12 \ | ||
74 | set prefix None \;\ | ||
75 | set key-table off \;\ | ||
76 | set status off \;\ | ||
77 | if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ | ||
78 | refresh-client -S \;\ | ||
79 | |||
80 | bind -T off F12 \ | ||
81 | set -u prefix \;\ | ||
82 | set -u key-table \;\ | ||
83 | set -u status \;\ | ||
84 | refresh-client -S | ||
85 | |||
86 | #wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]" | ||
87 | |||
88 | set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host" | ||
89 | |||
90 | if-shell "test -f ~/.tmux.conf.local" "source-file ~/.tmux.conf.local" | ||