blob: eb68f81bde960e10b93757f84c9bb1dd4b52ceb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 %V %a %Y-%m-%d %H:%M')"
echo "| $(temp)| ${bat}| ${time} |"
|