This commit is contained in:
nik
2025-10-15 17:42:45 -07:00
parent 5dee92a92a
commit ef9df4c384

15
scripts/status Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
while true; do
BATTERY="$(cat /sys/class/power_supply/BAT1/capacity)%"
MEMORY_USED="$(free -m | awk 'NR==2 {print $3}')"
VOLUME=$(wpctl get-volume @DEFAULT_SINK@)
DATE_TIME=$(date +%m-%d-%Y" "%R:%S)
if [ "$MEMORY_USED" -gt 4096 ]; then
MEMORY_USED="$((MEMORY_USED/1024)) GiB"
else
MEMORY_USED="$MEMORY_USED MiB"
fi
xsetroot -name "$BATTERY $MEMORY_USED $VOLUME $DATE_TIME"
sleep 1
done