From 88e326062c8165cba6a99a1e0f7d7ec547a31987 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 20 Nov 2024 18:17:32 +0800 Subject: Update --- misc/tmux.conf | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'misc') diff --git a/misc/tmux.conf b/misc/tmux.conf index bc69b14..013aee8 100644 --- a/misc/tmux.conf +++ b/misc/tmux.conf @@ -30,3 +30,61 @@ bind C-q select-layout even-horizontal bind C-w select-layout even-vertical bind C-e select-layout main-horizontal bind C-r select-layout main-vertical + +# color +# Feel free to NOT use this variables at all (remove, rename) +# this are named colors, just for convenience +color_orange="colour166" # 208, 166 +color_purple="colour134" # 135, 134 +color_green="colour076" # 070 +color_blue="colour39" +color_yellow="colour220" +color_red="colour160" +color_black="colour232" +color_white="white" # 015 + +# This is a theme CONTRACT, you are required to define variables below +# Change values, but not remove/rename variables itself +color_dark="$color_black" +color_light="$color_white" +color_session_text="$color_blue" +color_status_text="colour245" +color_main="$color_orange" +color_secondary="$color_purple" +color_level_ok="$color_green" +color_level_warn="$color_yellow" +color_level_stress="$color_red" +color_window_off_indicator="colour088" +color_window_off_status_bg="colour238" +color_window_off_status_current_bg="colour254" + +# nested tmux + +bind -T root S-F12 \ + set prefix None \;\ + set key-table off \;\ + set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\ + 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]" \;\ + set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\ + if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ + refresh-client -S \;\ + +bind -T root F12 \ + set prefix None \;\ + set key-table off \;\ + set status off \;\ + if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ + refresh-client -S \;\ + +bind -T off F12 \ + set -u prefix \;\ + set -u key-table \;\ + set -u status \;\ + set -u status-style \;\ + set -u window-status-current-style \;\ + set -u window-status-current-format \;\ + refresh-client -S + +#wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]" + +set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | $wg_user_host" -- cgit v1.2.3-70-g09d2