From 5dee041c47830420ab740ae9f04d6b9b74c7d6f7 Mon Sep 17 00:00:00 2001 From: Adam Keenan Date: Wed, 17 Jul 2024 16:27:24 -0400 Subject: [PATCH 1/2] Fix cute battery by pulling out icon decisions --- segments/battery.sh | 121 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 97 insertions(+), 24 deletions(-) diff --git a/segments/battery.sh b/segments/battery.sh index b98a9a20..18f33ab3 100755 --- a/segments/battery.sh +++ b/segments/battery.sh @@ -9,6 +9,8 @@ BATTERY_MED="󱊢" BATTERY_EMPTY="󱊡" BATTERY_CHARGE="󰂄" ADAPTER="󰚥" +BATTERY_CUTE_FULL="" +BATTERY_CUTE_EMPTY="♥" generate_segmentrc() { read -r -d '' rccontents < Date: Thu, 18 Jul 2024 15:32:54 -0400 Subject: [PATCH 2/2] Fix a couple linter errors --- segments/battery.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/segments/battery.sh b/segments/battery.sh index 18f33ab3..139ad3b6 100755 --- a/segments/battery.sh +++ b/segments/battery.sh @@ -92,7 +92,7 @@ __battery_osx() { if [[ ("$fully_charged" == "Yes" || $charge -eq 100) && $extconnect == "Yes" ]]; then return fi - echo $charge + echo "$charge" } __battery_icon_osx() { @@ -151,7 +151,7 @@ __battery_icon_linux() { else icon="$BATTERY_FULL" fi - echo $icon + echo "$icon" ;; esac } @@ -217,5 +217,5 @@ __linux_get_bat() { } __freebsd_get_bat() { - echo "$(sysctl -n hw.acpi.battery.life)" + sysctl -n hw.acpi.battery.life }