From df189ed53b78c109c76fe53d96de624414b5e4c1 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 4 Jul 2025 17:52:47 +0800 Subject: Update --- Makefile | 2 +- misc/tmux.conf | 90 ---------------------------------------------------------- tmux/tmux.conf | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 91 deletions(-) delete mode 100644 misc/tmux.conf create mode 100644 tmux/tmux.conf diff --git a/Makefile b/Makefile index 1acf37f..c4aa1f3 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ mutt: ~/.local/share/application pass mail/mutt.hooks >mutt/hooks.topo tmux: - ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf + ln -sf `pwd`/tmux/tmux.conf ~/.tmux.conf crontab: (crontab -l 2>/dev/null; cat bin/cron/* | sed '/^#/ d') | crontab - diff --git a/misc/tmux.conf b/misc/tmux.conf deleted file mode 100644 index 1ddc877..0000000 --- a/misc/tmux.conf +++ /dev/null @@ -1,90 +0,0 @@ -new-session # Start a new session if none available - -# tty -set -g default-terminal "tmux-256color" -set -ag terminal-overrides ",xterm-256color:RGB" -set -sg escape-time 0 -set -gw xterm-keys on - -# prefix -unbind C-b -set -g prefix C-g - -# Tab key -bind-key -nr C-_ send-keys C-/ - -# status bar -set-window-option -g window-status-current-style fg=black,bg=yellow - - -bind N new-session -bind-key -n C-F3 set -g status #Ctrl+F3 Combo - -bind k copy-mode -bind-key T swap-window -t 0 - -# config -bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." - -# layout -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 \;\ - 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" - -if-shell "test -f ~/.tmux.conf.local" "source-file ~/.tmux.conf.local" 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 @@ +new-session # Start a new session if none available + +# tty +set -g default-terminal "tmux-256color" +set -ag terminal-overrides ",xterm-256color:RGB" +set -sg escape-time 0 +set -gw xterm-keys on + +# prefix +unbind C-b +set -g prefix C-g + +# Tab key +bind-key -nr C-_ send-keys C-/ + +# status bar +set-window-option -g window-status-current-style fg=black,bg=yellow + + +bind N new-session +bind-key -n C-F3 set -g status #Ctrl+F3 Combo + +bind k copy-mode +bind-key T swap-window -t 0 + +# config +bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." + +# layout +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 \;\ + 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" + +if-shell "test -f ~/.tmux.conf.local" "source-file ~/.tmux.conf.local" -- cgit v1.2.3-70-g09d2