tmux configurable theme color

This commit is contained in:
David Chen 2025-10-05 09:47:29 -07:00
parent 20361356a9
commit 982b8a0864
3 changed files with 5 additions and 4 deletions

View file

@ -36,6 +36,7 @@ XDG_MENU_PREFIX XDG_RUNTIME_DIR XDG_SESSION_CLASS \
XDG_SESSION_DESKTOP XDG_SESSION_TYPE XDG_CURRENT_DESKTOP \
XMODIFIERS \
FZF_DEFAULT_OPTS \
TMUX_THEME_COLOR \
'
# set-hook -gu client-attached
# set-hook -g client-attached 'run -b "cut -c3- ~/.tmux.conf | sh -s update_env_event"'
@ -238,7 +239,7 @@ bind C-g if-shell '[[ $(tmux showw synchronize-panes | cut -d\ -f2) == "on" ]]'
setw -g pane-border-status top
set -g pane-active-border-style fg=brightblue
set -g pane-border-style fg=colour244
setw -g pane-border-format '#{?pane_active, #[fg=#b294bb]#[bg=#b294bb]#[fg=#1d1f21]#[bold] #{?window_zoomed_flag,⛶ ,} #(~/.config/tmux/scripts/pane_starship_title.sh #{pane_pid} #{pane_width} "#{pane_current_path}" "#{pane_current_command}") #[bg=default]#[fg=#b294bb]#[default], #[fg=colour246] #{?window_zoomed_flag,⛶ ,} #(~/.config/tmux/scripts/pane_starship_title.sh #{pane_pid} #{pane_width} "#{pane_current_path}" "#{pane_current_command}") }'
setw -g pane-border-format '#{?pane_active, #[fg=#{?#{!=:#{environ:TMUX_THEME_COLOR},},#{environ:TMUX_THEME_COLOR},#b294bb}]#[bg=#{?#{!=:#{environ:TMUX_THEME_COLOR},},#{environ:TMUX_THEME_COLOR},#b294bb}]#[fg=#1d1f21]#[bold] #{?window_zoomed_flag,⛶ ,} #(~/.config/tmux/scripts/pane_starship_title.sh #{pane_pid} #{pane_width} "#{pane_current_path}" "#{pane_current_command}") #[bg=default]#[fg=#{?#{!=:#{environ:TMUX_THEME_COLOR},},#{environ:TMUX_THEME_COLOR},#b294bb}]#[default], #[fg=colour244]#[bg=colour244]#[fg=#1d1f21] #{?window_zoomed_flag,⛶ ,} #(~/.config/tmux/scripts/pane_starship_title.sh #{pane_pid} #{pane_width} "#{pane_current_path}" "#{pane_current_command}") #[bg=default]#[fg=colour244]#[default] }'
#set -g pane-active-border-style fg=brightblue
#set -g pane-border-style fg=magenta
@ -257,7 +258,7 @@ set -g status-bg black
#set -g status-right '#(rainbarf --battery --remaining --bolt --tmux --rgb)'
#set -g status-left "#[fg=magenta,bold] %Y-%m-%d %H:%M | #[fg=brightblue]#(curl icanhazip.com) #(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #(ifconfig en3 | grep 'inet ' | awk '{print \"en3 \" $2}') #(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') "
setw -g window-status-format '#[fg=brightblue] #W '
setw -g window-status-current-format '#[fg=magenta,bold] #W '
setw -g window-status-current-format '#[fg=#{?#{!=:#{environ:TMUX_THEME_COLOR},},#{environ:TMUX_THEME_COLOR},#b294bb},bold] #W '
setw -g window-status-activity-style bg=black
setw -g window-status-bell-style bg=black
#set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"

View file

@ -22,7 +22,7 @@ fi
inactive_bg="#373b41"
inactive_fg="#c5c8c6"
active_bg="#b294bb"
active_bg="${TMUX_THEME_COLOR:-#b294bb}"
active_fg="#1d1f21"
separator=""
left_cap="█"

View file

@ -24,7 +24,7 @@ fi
segment_bg="#3b4252"
segment_fg="#eceff4"
# Host (domain) colors to mirror left active style
host_bg="#b294bb"
host_bg="${TMUX_THEME_COLOR:-#b294bb}"
host_fg="#1d1f21"
separator=""
right_cap="█"