From 251d4c3cf466de7d43166978921590975711bb28 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Fri, 9 Jun 2023 12:08:17 -0400 Subject: [PATCH] .xinitrc: change dwm status bar info --- src/.xinitrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/.xinitrc b/src/.xinitrc index c22f8db..530925d 100755 --- a/src/.xinitrc +++ b/src/.xinitrc @@ -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 &