Skip to content

Commit a446f47

Browse files
committed
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
1 parent 79068c4 commit a446f47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/dracula.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ main()
2626
time_format=$(get_tmux_option "@dracula-time-format" "")
2727
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
2828
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
29+
IFS=' ' read -r -a current_window_colors <<< $(get_tmux_option "@dracula-current-window-colors" "dark_purple white")
30+
IFS=' ' read -r -a window_colors <<< $(get_tmux_option "@dracula-window-colors" "gray white")
2931
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
3032

3133
# Dracula Color Pallette
@@ -244,14 +246,15 @@ main()
244246

245247
# Window option
246248
if $show_powerline; then
247-
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}"
249+
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}"
248250
else
249-
tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W${current_flags} "
251+
tmux set-window-option -g window-status-current-format "#[fg=${!current_window_colors[1]},bg=${!current_window_colors[0]}] #I #W${current_flags} "
250252
fi
251253

252-
tmux set-window-option -g window-status-format "#[fg=${white}]#[bg=${gray}] #I #W${flags}"
254+
tmux set-window-option -g window-status-format "#[fg=${!window_colors[1]}]#[bg=${!window_colors[0]}] #I #W${flags}"
253255
tmux set-window-option -g window-status-activity-style "bold"
254256
tmux set-window-option -g window-status-bell-style "bold"
257+
255258
}
256259

257260
# run main function

0 commit comments

Comments
 (0)