summaryrefslogtreecommitdiff
path: root/local
diff options
context:
space:
mode:
Diffstat (limited to 'local')
-rwxr-xr-xlocal/bin/update-dwm-bar7
1 files changed, 5 insertions, 2 deletions
diff --git a/local/bin/update-dwm-bar b/local/bin/update-dwm-bar
index 276b9e7..ac68582 100755
--- a/local/bin/update-dwm-bar
+++ b/local/bin/update-dwm-bar
@@ -4,8 +4,11 @@ DELAY=20
sep=$(echo -e '\u2502')
while true; do
+ if hash upsc 2>/dev/null; then
+ ups="UPS: $(upsc eaton5e@zoidberg battery.charge)% $sep "
+ fi
if [ -f ~/.cache/XAGNZD ]; then
- xag="$(cat ~/.cache/XAGNZD) $sep "
+ xa="$(cat ~/.cache/XAGNZD) $(cat ~/.cache/XAUNZD) $sep "
fi
if [ -d "/sys/class/power_supply/BAT0/" ]; then
bat="$(cat /sys/class/power_supply/BAT0/capacity)%"
@@ -32,7 +35,7 @@ while true; do
done
thermal_string="${thermal_string%,} °C"
datetime_string=$(date "+%A $sep %d %h %Y $sep %_I:%M %p (UTC%:::z)")
- xsetroot -name "$xag$thermal_string $sep $bat_string$datetime_string" || exit
+ xsetroot -name "$xa$ups$thermal_string $sep $bat_string$datetime_string" || exit
sleep "$DELAY"
done