diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-05-18 20:56:13 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-05-18 20:56:13 -0400 |
commit | 0ce7301d8799ba91a0d57ab208e2d80d20935a83 (patch) | |
tree | e509a730a429ffdbb418dbb53b42557d40541f8e /i3blocks-cputemp.sh | |
parent | 6e14535ef56fd91b05eb170f71f7989d7435d8c3 (diff) | |
download | scripts-0ce7301d8799ba91a0d57ab208e2d80d20935a83.tar.xz scripts-0ce7301d8799ba91a0d57ab208e2d80d20935a83.zip |
temp fixes for blocks utf+8 errors, added dict.sh, updated porter
Diffstat (limited to 'i3blocks-cputemp.sh')
-rwxr-xr-x | i3blocks-cputemp.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/i3blocks-cputemp.sh b/i3blocks-cputemp.sh index c88ecef..faac2de 100755 --- a/i3blocks-cputemp.sh +++ b/i3blocks-cputemp.sh @@ -1,16 +1,18 @@ #!/bin/sh -low=122 # 50C +#low=122 # 50C high=176 # 80C -icon_low= -icon_mid= -icon_high= +#icon_low= +#icon_mid= +#icon_high= +icon= 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 +#[ $celcius -lt $low ] && printf $icon_low +#[ $celcius -ge $low ] && [ $fahrenheit -lt $high ] && printf $icon_mid +#[ $celcius -ge $high ] && printf $icon_high +[ $celcius -ge $high ] && notify-send "CPU temperature hit 176F (80C)" #printf " %s C\n" $celcius # 'Murica -printf " %s ℉\n" $(echo "scale=1; $celcius * 9 / 5 + 32" | bc -l) +printf "$icon%s ℉\n" $(echo "scale=1; $celcius * 9 / 5 + 32" | bc -l) |