summaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rwxr-xr-xsway/status.sh9
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} |"