From 6176f1886c398be739a45016347fba10d7d99bd3 Mon Sep 17 00:00:00 2001 From: Rose Hellsing Date: Sun, 14 Sep 2025 19:45:34 +0200 Subject: desktop: Add battery status to bar --- desktop/.local/bin/barstatus | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/.local/bin/barstatus b/desktop/.local/bin/barstatus index 3275533..413e9d8 100755 --- a/desktop/.local/bin/barstatus +++ b/desktop/.local/bin/barstatus @@ -2,6 +2,11 @@ echo -n "SPKR: $(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2> /dev/null ) ; MIC: $(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ 2> /dev/null) " echo -n " | " echo -n "$(date)" +echo -n " | " +if [ $(hostname) == "sunflower" ]; then + echo -n "BATTERY: $(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'percentage' | tr -d ' ' | sed 's/:/: /g'); " + echo -n "$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'state' | tr -d ' ' | sed 's/:/: /g')" +fi pidof qmmp 2> /dev/null > /dev/null if [ $? -eq 0 ]; then echo -n " | " -- cgit v1.2.3