Skip to content

Commit

Permalink
Adding support to customize the current window colors
Browse files Browse the repository at this point in the history
+ 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
  • Loading branch information
mrbrandao committed Jun 16, 2023
1 parent 79068c4 commit a446f47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/dracula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a446f47

Please sign in to comment.