1
0
Fork 0

fix(swaybar): adapt thermal warnings to real-life conditions

This commit is contained in:
Oliver Ladner 2025-10-15 14:51:52 +02:00
commit 9c2358068d

View file

@ -32,13 +32,13 @@ common() {
temp_cpu() {
local name="cpu"
local cpu=$(expr $(cat /sys/class/thermal/thermal_zone2/temp) / 1000)
if [[ $(echo "$cpu >= 55" | bc -l ) == "1" ]] && [[ $(echo "$cpu < 65" | bc -l ) == "1" ]]; then
if [[ $(echo "$cpu >= 60" | bc -l ) == "1" ]] && [[ $(echo "$cpu < 70" | bc -l ) == "1" ]]; then
local bg=$warn1
local fg=$text_dark
elif [[ $(echo "$cpu >= 65" | bc -l ) == "1" ]] && [[ $(echo "$cpu < 75" | bc -l ) == "1" ]]; then
elif [[ $(echo "$cpu >= 70" | bc -l ) == "1" ]] && [[ $(echo "$cpu < 80" | bc -l ) == "1" ]]; then
local bg=$warn2
local fg=$text_dark
elif [[ $(echo "$cpu >= 75" | bc -l ) == "1" ]]; then
elif [[ $(echo "$cpu >= 80" | bc -l ) == "1" ]]; then
local bg=$crit
local fg=$text_light
else