From 8ba6ac420cda8c105650cb20795b2ebea6948baa Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Tue, 22 Oct 2019 21:50:28 +0100 Subject: [PATCH] Added padding functionality and option to remove last separator. --- dwmbarrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dwmbarrc b/dwmbarrc index 6ee8ffa..0fa69a3 100755 --- a/dwmbarrc +++ b/dwmbarrc @@ -6,7 +6,7 @@ DELAY=0.05 MODULES_DIR="/home/$USER/.config/dwmbar/modules/" CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/" SEPARATOR=" | " -PADDING=" " +PADDING="$USER@$HOSTNAME " OUTPUT_CACHE="/home/$USER/.config/dwmbar/.cache/" OUTPUT="" @@ -18,7 +18,9 @@ get_bar(){ module_out=$(cat $OUTPUT_CACHE$module | sed 's/\.$//g') bar=$bar$module_out done - echo $bar | sed 's/.$//g' + # Uncomment to remove last separator + # bar=$(echo $bar | sed 's/.$//g') + echo "$bar$PADDING" } run_module(){