.xinitrc: change dwm status bar info

This commit is contained in:
dogeystamp 2023-06-09 12:08:17 -04:00
parent cd01465a43
commit 251d4c3cf4
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -40,11 +40,15 @@ export XCOMPOSEFILE="$XDG_CONFIG_HOME"/xcompose/main
while true; do
DATE=$(date +'%H:%M:%S %a %b %d')
TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C"
#TEMP="$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C"
BAT="$(acpi -b | head -n 1 | awk -F'[,:]' '{print $3}' | tr -d '[:space:]')"
KEY="$(xkblayout-state print '%s')"
if command -v xkblayout-state print &> /dev/null; then
KEY="$(xkblayout-state print '%s')"
else
KEY="??"
fi
xsetroot -name " $DATE // $TEMP, $BAT // $KEY"
xsetroot -name " $DATE // $BAT // $KEY"
sleep 1
done &