diff options
| author | Sam Nystrom <sam@samnystrom.dev> | 2023-04-16 15:38:21 -0500 |
|---|---|---|
| committer | Sam Nystrom <sam@samnystrom.dev> | 2023-04-16 15:38:21 -0500 |
| commit | 572640d0d06ece1e2c5556dea2ee2227e5816a23 (patch) | |
| tree | 0c5d9b30ad26b2404c59f6d32e0bd6b04aa0eed3 /bin | |
| parent | d43db52c715300245b5a151d65b39b003b5b7367 (diff) | |
fix(bin): fix low battery on statusbar
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/status.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/status.sh b/bin/status.sh index 24f0f59..32794ea 100755 --- a/bin/status.sh +++ b/bin/status.sh @@ -1,4 +1,6 @@ -#!/bin/sh -eu +#!/bin/sh + +set -eu pulseaudio() { volume=$(pactl get-sink-volume @DEFAULT_SINK@ \ @@ -33,7 +35,7 @@ battery() { idx=$(( ($capacity - 1) / 10 )) case "$status" in - "Discharging") symbol=$(echo "<span foreground=\"#ed8796\"></span> " | awk "{ print \$$idx }" ) ;; + "Discharging") symbol=$(echo "<span foreground=\"#ed8796\"></span>,,,,,,,,," | awk -F, "{ print \$$idx }" ) ;; "Charging" ) symbol=$(echo " " | awk "{ print \$$idx }" ) ;; "Full" ) symbol="" ;; esac |
