blob: c88eceffc14b45b62c65405b37120291b7de022d (
plain) (
tree)
|
|
#!/bin/sh
low=122 # 50C
high=176 # 80C
icon_low=
icon_mid=
icon_high=
celcius=$(sysctl -n dev.cpu.0.temperature | cut -d'.' -f1)
[ $celcius -lt $low ] && printf $icon_low
[ $celcius -ge $low ] && [ $fahrenheit -lt $high ] && printf $icon_mid
[ $celcius -ge $high ] && printf $icon_high
#printf " %s C\n" $celcius
# 'Murica
printf " %s ℉\n" $(echo "scale=1; $celcius * 9 / 5 + 32" | bc -l)
|