From bef0dba2c5b90e5849d39923ad537fc89fa931a3 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 13 Apr 2023 19:26:48 +0200 Subject: sway: status.sh: Add all thermal zone temperatures --- sway/status.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sway') 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} |" -- cgit v1.2.3-70-g09d2