Created
December 15, 2018 14:15
-
-
Save DRFR0ST/06aa1aad952ce188404c581c63166aa5 to your computer and use it in GitHub Desktop.
Sends a notification when the GPU temperature is over +85°C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
real=$(sensors | grep 'temp1' | grep -oP -m 1 "\+\d{2}.\d°C" | head -1 | gre$ | |
high=85 | |
if [ "$real" -ge "$high" ];then | |
notify-send "The temperature of GPU is very high! (+$real°C)" | |
sleep 60 | |
else | |
sleep 5 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment