From 857d57df7c22764a8a949e089f1782e37e99cfd9 Mon Sep 17 00:00:00 2001 From: Daniel Memije Date: Fri, 20 Nov 2020 17:54:40 -0600 Subject: [PATCH 1/3] Added padding at the end of left icon for custom args --- scripts/dracula.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index da72637..f963532 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -62,7 +62,7 @@ main() window) left_icon="#W ";; *) - left_icon=$show_left_icon;; + left_icon="$show_left_icon ";; esac # Handle powerline option From 5b31360b95af40848b1fc637de64df114e30b128 Mon Sep 17 00:00:00 2001 From: Daniel Memije Date: Wed, 16 Dec 2020 10:59:24 -0600 Subject: [PATCH 2/3] Added left icon padding configuration --- INSTALL.md | 1 + scripts/dracula.sh | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index b28c7f3..7720b56 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -28,6 +28,7 @@ Customize the status bar by adding any of these lines to your .tmux.conf as desi * Enable military time: `set -g @dracula-military-time true` * Disable timezone: `set -g @dracula-show-timezone false` * Switch the left smiley icon `set -g @dracula-show-left-icon session` it can accept `session`, `smiley`, `window`, or any character. +* Add padding to the left smiley icon `set -g @dracula-left-icon-padding` default is 1, it can accept any number and 0 disables padding. * Enable high contrast pane border: `set -g @dracula-border-contrast true` * Enable cpu usage: `set -g @dracula-cpu-usage true` * Enable ram usage: `set -g @dracula-ram-usage true` diff --git a/scripts/dracula.sh b/scripts/dracula.sh index f963532..8a2f886 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -27,6 +27,7 @@ main() show_powerline=$(get_tmux_option "@dracula-show-powerline" false) show_flags=$(get_tmux_option "@dracula-show-flags" false) show_left_icon=$(get_tmux_option "@dracula-show-left-icon" smiley) + show_left_icon_padding=$(get_tmux_option "@dracula-left-icon-padding" 1) show_military=$(get_tmux_option "@dracula-military-time" false) show_timezone=$(get_tmux_option "@dracula-show-timezone" true) show_left_sep=$(get_tmux_option "@dracula-show-left-sep" ) @@ -56,15 +57,19 @@ main() # Handle left icon configuration case $show_left_icon in smiley) - left_icon="☺ ";; + left_icon="☺";; session) - left_icon="#S ";; + left_icon="#S";; window) - left_icon="#W ";; + left_icon="#W";; *) - left_icon="$show_left_icon ";; + left_icon=$show_left_icon;; esac + # Handle left icon padding + padding="$(seq -f " " -s '' $show_left_icon_padding)" + left_icon="$left_icon$padding" + # Handle powerline option if $show_powerline; then right_sep="$show_right_sep" From 3a2538ac2e31dd19b559a097676a51932eea7e6c Mon Sep 17 00:00:00 2001 From: Daniel Memije Date: Wed, 16 Dec 2020 11:11:02 -0600 Subject: [PATCH 3/3] Fixed @dracula-left-icon-padding not disabling padding when 0 --- scripts/dracula.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/dracula.sh b/scripts/dracula.sh index 8a2f886..4a5f4ae 100755 --- a/scripts/dracula.sh +++ b/scripts/dracula.sh @@ -67,7 +67,10 @@ main() esac # Handle left icon padding + padding="" + if [ "$show_left_icon_padding" -gt "0" ]; then padding="$(seq -f " " -s '' $show_left_icon_padding)" + fi left_icon="$left_icon$padding" # Handle powerline option