From 50c63f557d595f66e45c9877c99efe67d02bdcce Mon Sep 17 00:00:00 2001 From: Druxorey Date: Sat, 19 Oct 2024 01:28:47 -0400 Subject: [PATCH 1/7] feat(separator): added option to place separator symbols on the sides of the bar. --- scripts/dracula.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 14363b27..abb18c1b 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -29,6 +29,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) From 0217a506aa74f98eda37362285b4b228a9c869fe Mon Sep 17 00:00:00 2001 From: Druxorey Date: Sat, 19 Oct 2024 01:30:44 -0400 Subject: [PATCH 2/7] feat(separator): additional if statement to show the 'show_edge_icons' boolean. --- scripts/dracula.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index abb18c1b..d99fdc2a 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -145,7 +145,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=${dark_gray},fg=${green}]#{?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}" @@ -306,7 +310,11 @@ main() 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 " + if $show_edge_icons; then + tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${dark_gray},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script #[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" + else + tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script " + fi else tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }" fi From 245752ef327a4a4f39e41cb1cc72e585bccdb065 Mon Sep 17 00:00:00 2001 From: Druxorey Date: Wed, 22 Jan 2025 01:07:44 -0400 Subject: [PATCH 3/7] fix: correct tmux `$show_edge_icons` display logic Fixed the logic for setting the `$show_edge_icons` variable when the `$show_empty_plugins` is false. --- scripts/dracula.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 3b980f49..a510008d 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -326,7 +326,11 @@ main() tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script " fi else - tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }" + if $show_edge_icons; then + tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${dark_gray},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script #[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" + else + tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }" + fi fi powerbg=${!colors[0]} else From 8745a65f0f63423768b04e238036ebb5c8dc6440 Mon Sep 17 00:00:00 2001 From: Druxorey Date: Wed, 22 Jan 2025 01:38:54 -0400 Subject: [PATCH 4/7] refactor(show_edge_icons): simplify edge icon logic in status-right: Refactored the logic for `$show_edge_icons` in the tmux status-right configuration. The edge icon calculation is now done beforehand, reducing the complexity of the if statements and improving code readability. --- scripts/dracula.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index a510008d..41616d63 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -318,20 +318,19 @@ main() script="#($current_dir/sys_temp.sh)" fi + if $show_edge_icons; then + edge_icons="#[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" + background_color="${dark_gray}" + else + background_color="${powerbg}" + fi + if $show_powerline; then if $show_empty_plugins; then - if $show_edge_icons; then - tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${dark_gray},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script #[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" - else - tmux set-option -ga status-right "#[fg=${!colors[0]},bg=${powerbg},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script " - fi + tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${background_color},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script $edge_icons" else - if $show_edge_icons; then - tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${dark_gray},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script #[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" - else - tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script }" - fi - fi + tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[0]},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script $edge_icons }" + fi powerbg=${!colors[0]} else if $show_empty_plugins; then @@ -340,6 +339,7 @@ main() tmux set-option -ga status-right "#{?#{==:$script,},,#[fg=${!colors[1]},bg=${!colors[0]}] $script }" fi fi + done # Window option From 71f14f52bfcd4ffe7167a4e8478b9ff15dd3f161 Mon Sep 17 00:00:00 2001 From: Druxorey Date: Wed, 22 Jan 2025 13:00:33 -0400 Subject: [PATCH 5/7] docs(edge-icons): add edge icons configuration: Added a new section in the CONFIG.md to enable edge icons for the Dracula theme. This provides users with an option to display edge icons in their tmux status bar. --- docs/CONFIG.md | 5 +++++ 1 file changed, 5 insertions(+) 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 From d2b7b1a7b059d71cc474c44a197f1e7203e88915 Mon Sep 17 00:00:00 2001 From: Druxorey Date: Wed, 22 Jan 2025 15:24:27 -0400 Subject: [PATCH 6/7] fix(edge-icons): correct background color handling: Fixed the background color handling in the status bar. Changed from a fixed value to using the `bg_color` variable for better consistency and customization. --- scripts/dracula.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 41616d63..0a21026b 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -152,7 +152,7 @@ main() # Status left if $show_powerline; then if $show_edge_icons; then - tmux set-option -g status-left "#[bg=${dark_gray},fg=${green}]#{?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} " + 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 @@ -318,19 +318,20 @@ main() script="#($current_dir/sys_temp.sh)" fi + # edge styling if $show_edge_icons; then - edge_icons="#[bg=${dark_gray},fg=${!colors[0]}]${show_left_sep}" - background_color="${dark_gray}" + right_edge_icon="#[bg=${bg_color},fg=${!colors[0]}]${show_left_sep}" + background_color=${bg_color} else - background_color="${powerbg}" + background_color=${powerbg} fi if $show_powerline; then if $show_empty_plugins; then - tmux set-option -ga status-right " #[fg=${!colors[0]},bg=${background_color},nobold,nounderscore,noitalics]${right_sep}#[fg=${!colors[1]},bg=${!colors[0]}] $script $edge_icons" + 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 $edge_icons }" - 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 From 9c52a41dfaf9120ea9a2e71f2783fb9d1a6bf3a9 Mon Sep 17 00:00:00 2001 From: Druxorey Date: Wed, 22 Jan 2025 17:43:54 -0400 Subject: [PATCH 7/7] fix(edge-icons): correct separator colors with transparent bg: Fixed the edge icons colors and styles when `$transparent_powerline_bg` is false. This ensures that the correct colors are applied based on the edge icon configuration. --- scripts/dracula.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 0a21026b..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" "") @@ -62,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