From 5666ca42d78f5e0035fd334f52959e29f0911b6c Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Fri, 25 Oct 2019 13:11:58 +0100 Subject: [PATCH 1/4] Fix whitespace issues with mpd module. --- modules/mpd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/mpd b/modules/mpd index 5db0d64..67c319f 100755 --- a/modules/mpd +++ b/modules/mpd @@ -5,20 +5,20 @@ PREFIX_PAUSE=' ' get_mpd() { - current_song=$(mpc current) + current_song="$(mpc current)" if [[ "$current_song" = "" ]]; then exit 0 else playpause=$(mpc | awk '/\[.*]/{split($0, a, " "); print a[1]}') if [[ "$playpause" = "[playing]" ]]; then - current_song=$PREFIX_PLAY$current_song + current_song="$PREFIX_PLAY $current_song" elif [[ "$playpause" = "[paused]" ]]; then - current_song=$PREFIX_PAUSE$current_song + current_song="$PREFIX_PAUSE $current_song" fi fi - echo $current_song + echo "$current_song" } get_mpd From 186525c897368323904082a8c0d6f0da3575d05f Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Fri, 25 Oct 2019 16:31:27 +0100 Subject: [PATCH 2/4] Improve spacing in battery module. --- modules/battery | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/battery b/modules/battery index 901a66e..b5e25fa 100755 --- a/modules/battery +++ b/modules/battery @@ -2,12 +2,12 @@ # Prints out battery percentage -CHARGING_ICON=' ' -WARNING_ICON=' ' -BATTERY_FULL_ICON=' ' -BATTERY_2_ICON=' ' -BATTERY_3_ICON=' ' -BATTERY_4_ICON=' ' +CHARGING_ICON='' +WARNING_ICON='' +BATTERY_FULL_ICON='' +BATTERY_2_ICON='' +BATTERY_3_ICON='' +BATTERY_4_ICON='' FULL_AT=98 From f2c4077fecc3f3da59b90b5ce5dfe5b8da196678 Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Fri, 25 Oct 2019 16:38:03 +0100 Subject: [PATCH 3/4] Improved spacing in cpuload module --- modules/cpuload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cpuload b/modules/cpuload index 44a8ff1..133a748 100755 --- a/modules/cpuload +++ b/modules/cpuload @@ -26,7 +26,7 @@ get_load() cpu_last=("${cpu_now[@]}") cpu_last_sum=$cpu_sum - echo "$PREFIX$cpu_usage%" + echo "$PREFIX $cpu_usage%" } get_load From f1affabae0891f0746cc68d6dafee33d5ffaf1ce Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Sat, 26 Oct 2019 15:45:40 +0100 Subject: [PATCH 4/4] Changed battery icon spacing Spacing is only inserted if charging or warning icon shows. --- modules/battery | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/battery b/modules/battery index b5e25fa..ba61912 100755 --- a/modules/battery +++ b/modules/battery @@ -2,8 +2,8 @@ # Prints out battery percentage -CHARGING_ICON='' -WARNING_ICON='' +CHARGING_ICON=' ' +WARNING_ICON=' ' BATTERY_FULL_ICON='' BATTERY_2_ICON='' BATTERY_3_ICON='' @@ -37,7 +37,7 @@ get_battery() BAT_ICON=$BATTERY_2_ICON fi fi - echo "$ICON $BAT_ICON $capacity%" + echo "$ICON$BAT_ICON $capacity%" } get_battery