Move the status generation to its own file and give it a testing mode. Greatly enhance the logic and reduce the amount of times each variable gets updated.

This commit is contained in:
2025-11-10 21:11:10 -07:00
parent ce67c2a5b8
commit b0762c7baf
2 changed files with 66 additions and 23 deletions

View File

@@ -35,29 +35,8 @@ xsetroot -solid "$purple"
#exec slstatus &
# Custom Setup #
# Icons: https://fontawesome.com/v4/cheatsheet/
source "`which volume.function`"
source "`which battery.function`"
source "`which storage.function`"
if [[ "`storage-root`" == "`storage-home`" ]]; then
function dwm-storage {
echo "`storage-root-dwm`)"
}
else
function dwm-storage {
echo "(Root `storage-root-dwm`, Home `storage-home-dwm`)"
}
fi
while true; do
readout="$readout  `battery-display`"
readout="$readout |  `dwm-storage`"
readout="$readout |  `volume-display`"
readout="$readout | `whoami`@`hostname`"
readout="$readout `date +"%Y-%m-%d %H:%M:%S"`"
xsetroot -name "$readout"
readout=""
sleep 0.2
done &
source "`which dwm-status.function`"
dwm-status &
## Start ##