From a446f470ae8a63bb8b3306037ea0b072e04da90f Mon Sep 17 00:00:00 2001 From: Igor Brandao Date: Fri, 16 Jun 2023 11:37:52 -0300 Subject: [PATCH] Adding support to customize the current window colors + Enabling the support to customize the current window fg/bg colors via `@dracula-current-window-colors` + Enabling as well support to customize the inactivity fg/bg window colors via `@dracula-window-colors` + This might be related with the issue #128 --- scripts/dracula.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index af0b2224..b4ee40d0 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -26,6 +26,8 @@ main() time_format=$(get_tmux_option "@dracula-time-format" "") show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "") IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather") + IFS=' ' read -r -a current_window_colors <<< $(get_tmux_option "@dracula-current-window-colors" "dark_purple white") + IFS=' ' read -r -a window_colors <<< $(get_tmux_option "@dracula-window-colors" "gray white") show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true) # Dracula Color Pallette @@ -244,14 +246,15 @@ main() # Window option if $show_powerline; then - tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${white},bg=${dark_purple}] #I #W${current_flags} #[fg=${dark_purple},bg=${gray}]${left_sep}" + tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${dark_purple}]${left_sep}#[fg=${!current_window_colors[1]},bg=${!current_window_colors[0]}] #I #W${current_flags} #[fg=${dark_purple},bg=${gray}]${left_sep}" else - tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W${current_flags} " + tmux set-window-option -g window-status-current-format "#[fg=${!current_window_colors[1]},bg=${!current_window_colors[0]}] #I #W${current_flags} " fi - tmux set-window-option -g window-status-format "#[fg=${white}]#[bg=${gray}] #I #W${flags}" + tmux set-window-option -g window-status-format "#[fg=${!window_colors[1]}]#[bg=${!window_colors[0]}] #I #W${flags}" tmux set-window-option -g window-status-activity-style "bold" tmux set-window-option -g window-status-bell-style "bold" + } # run main function