diff options
author | xengineering <me@xengineering.eu> | 2023-04-13 19:26:48 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-04-13 19:26:48 +0200 |
commit | bef0dba2c5b90e5849d39923ad537fc89fa931a3 (patch) | |
tree | a8b6ea49e564dc04705f45ac378c448e2029d1d1 /sway | |
parent | 95ac47d754484a177e31abdf26d1710d71e92b6b (diff) | |
download | dotfiles-bef0dba2c5b90e5849d39923ad537fc89fa931a3.tar dotfiles-bef0dba2c5b90e5849d39923ad537fc89fa931a3.tar.zst dotfiles-bef0dba2c5b90e5849d39923ad537fc89fa931a3.zip |
sway: status.sh: Add all thermal zone temperatures
Diffstat (limited to 'sway')
-rwxr-xr-x | sway/status.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/status.sh b/sway/status.sh index 03dfcd1..6bbbd63 100755 --- a/sway/status.sh +++ b/sway/status.sh @@ -1,8 +1,15 @@ #!/bin/sh +temp() { + find /sys/class/thermal -type l -name 'thermal_zone*' | \ + while read -r zone + do + printf "%s °C " "$(( $(cat ${zone}/temp) / 1000 ))" + done +} bat="BAT $(cat /sys/class/power_supply/BAT*/capacity | tr '\n' ' ')" time="$(date '+KW %W %a %Y-%m-%d %H:%M')" -echo "| ${bat}| ${time} |" +echo "| $(temp)| ${bat}| ${time} |" |