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 | 824466212bd4cdf3342caff67a502653f18739c6 (patch) | |
| tree | a8b6ea49e564dc04705f45ac378c448e2029d1d1 /sway | |
| parent | 6589dbfc0ca6e8d6854d448b5d01bb8c8fa01309 (diff) | |
| download | dotfiles-824466212bd4cdf3342caff67a502653f18739c6.tar dotfiles-824466212bd4cdf3342caff67a502653f18739c6.tar.zst dotfiles-824466212bd4cdf3342caff67a502653f18739c6.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} |" |
