simple temp. monintor (through lm-sensors) for conky/etc
#!/bin/bash
sensors | grep -oP '(?<=\+).*?(?=\..°C )' > /tmp/temp1.txt
#nvidia-settings -q gpucoretemp -t | tail -n1 > /tmp/temp2.txt
temp1=`sed '1q;d' /tmp/temp1.txt`
temp2=`sed '2q;d' /tmp/temp1.txt`
temp3=`sed '3q;d' /tmp/temp1.txt`
temp4=`sed '4q;d' /tmp/temp1.txt`
temp5=`sed '5q;d' /tmp/temp1.txt`
temp6=`sed '6q;d' /tmp/temp1.txt`
temp7=`sed '7q;d' /tmp/temp1.txt`
temp8=`sed '8q;d' /tmp/temp1.txt`
#temp8=`sed '1q;d' /tmp/temp2.txt`
if [[ $temp1 -gt "97" ]]; then
echo heat [cpu/acpi]
dunstify -u critical '+'$temp1' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp2 -gt "97" ]]; then
echo heat [cpu/acpi]
dunstify -u critical '+'$temp2' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp3 -gt "97" ]]; then
echo heat [video]
dunstify -u critical '+'$temp3' 🌡 HEAT CRITICAL! [video]'
fi
if [[ $temp4 -gt "97" ]]; then
echo heat [cpu/acpi]
dunstify -u critical '+'$temp4' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp5 -gt "97" ]]; then
echo heat [cpu/acpi]
dunstify -u critical '+'$temp5' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp6 -gt "97" ]]; then
echo heat [сpu/acpi]
dunstify -u critical '+'$temp6' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp7 -gt "97" ]]; then
echo heat [cpu/acpi1]
dunstify -u critical '+'$temp7' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
if [[ $temp8 -gt "97" ]]; then
echo heat [cpu/acpi]
dunstify -u critical '+'$temp8' 🌡 HEAT CRITICAL! [cpu/acpi]'
fi
Комментариев нет:
Отправить комментарий