diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 5a542ecc..da29853e 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -90,6 +90,11 @@ Enable powerline symbols set -g @dracula-show-powerline true ``` +Enable edge icons +```bash +set -g @dracula-show-edge-icons true +``` + Switch powerline symbols ```bash diff --git a/scripts/dracula.sh b/scripts/dracula.sh index c0939aa2..e44592cd 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -5,8 +5,7 @@ export LC_ALL=en_US.UTF-8 current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source $current_dir/utils.sh -main() -{ +main() { # set configuration option variables show_krbtgt_label=$(get_tmux_option "@dracula-krbtgt-context-label" "") krbtgt_principal=$(get_tmux_option "@dracula-krbtgt-principal" "") @@ -29,6 +28,7 @@ main() show_timezone=$(get_tmux_option "@dracula-show-timezone" true) show_left_sep=$(get_tmux_option "@dracula-show-left-sep" ) show_right_sep=$(get_tmux_option "@dracula-show-right-sep" ) + show_edge_icons=$(get_tmux_option "@dracula-show-edge-icons" false) show_inverse_divider=$(get_tmux_option "@dracula-inverse-divider" ) show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false) show_day_month=$(get_tmux_option "@dracula-day-month" false) @@ -61,15 +61,27 @@ main() # Set transparency variables - Colors and window dividers if $transparent_powerline_bg; then - bg_color="default" - window_sep_fg=${dark_purple} - window_sep_bg=default - window_sep="$show_inverse_divider" + bg_color="default" + if $show_edge_icons; then + window_sep_fg=${dark_purple} + window_sep_bg=default + window_sep="$show_right_sep" + else + window_sep_fg=${dark_purple} + window_sep_bg=default + window_sep="$show_inverse_divider" + fi else bg_color=${gray} - window_sep_fg=${gray} - window_sep_bg=${dark_purple} - window_sep="$show_left_sep" + if $show_edge_icons; then + window_sep_fg=${dark_purple} + window_sep_bg=${gray} + window_sep="$show_inverse_divider" + else + window_sep_fg=${gray} + window_sep_bg=${dark_purple} + window_sep="$show_left_sep" + fi fi # Handle left icon configuration @@ -150,7 +162,11 @@ main() # Status left if $show_powerline; then - tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${bg_color}]#{?client_prefix,#[fg=${yellow}],}${left_sep}" + if $show_edge_icons; then + tmux set-option -g status-left "#[bg=${bg_color},fg=${green},bold]#{?client_prefix,#[fg=${yellow}],}${show_right_sep}#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${bg_color}]#{?client_prefix,#[fg=${yellow}],}${left_sep} " + else + tmux set-option -g status-left "#[bg=${dark_gray},fg=${green}]#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon} #[fg=${green},bg=${bg_color}]#{?client_prefix,#[fg=${yellow}],}${left_sep}" + fi powerbg=${bg_color} else tmux set-option -g status-left "#[bg=${green},fg=${dark_gray}]#{?client_prefix,#[bg=${yellow}],} ${left_icon}" @@ -313,12 +329,20 @@ main() script="#($current_dir/sys_temp.sh)" fi + # edge styling + if $show_edge_icons; then + right_edge_icon="#[bg=${bg_color},fg=${!colors[0]}]${show_left_sep}" + background_color=${bg_color} + else + background_color=${powerbg} + fi + if $show_powerline; then if $show_empty_plugins; then - tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script " + tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${background_color},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script $right_edge_icon" else - tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }" - fi + tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics] ${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script $right_edge_icon}" + fi powerbg=${!colors[0]} else if $show_empty_plugins; then @@ -327,6 +351,7 @@ main() tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[1]},bg=${!colors[0]}] $script }" fi fi + done # Window option