Skip to content

Instantly share code, notes, and snippets.

@DRFR0ST
Created December 15, 2018 14:15
Show Gist options
  • Save DRFR0ST/06aa1aad952ce188404c581c63166aa5 to your computer and use it in GitHub Desktop.
Save DRFR0ST/06aa1aad952ce188404c581c63166aa5 to your computer and use it in GitHub Desktop.
Sends a notification when the GPU temperature is over +85°C
#!/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