diff options
Diffstat (limited to 'configs/xmobar_cputemp.sh')
-rwxr-xr-x | configs/xmobar_cputemp.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/configs/xmobar_cputemp.sh b/configs/xmobar_cputemp.sh index 8af1b47..05f9f19 100755 --- a/configs/xmobar_cputemp.sh +++ b/configs/xmobar_cputemp.sh @@ -1,19 +1,19 @@ #!/bin/sh if [ "x$1" = "xCPU" ]; then - OUT=$(sensors | sed -n 's/^CPU Temperature:\s*+\(.*\)°C\s*(\(.*\)/\1/p') + OUT=$(sensors | sed -n 's/^CPU Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p') elif [ "x$1" = "xMB" ]; then - OUT=$(sensors | sed -n 's/^MB Temperature:\s*+\(.*\)°C\s*(\(.*\)/\1/p') + OUT=$(sensors | sed -n 's/^MB Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p') else exit 1 fi -if [ $OUT -ge 60 ]; then +if [ $OUT -le 60 ]; then + echo "$OUT°C" +elif [ $OUT -le 75 ]; then echo "<fc=#00FF00>$OUT</fc>°C" -elif [ $OUT -ge 67 ]; then +elif [ $OUT -le 85 ]; then echo "<fc=#FFFF00>$OUT</fc>°C" -elif [ $OUT -ge 75 ]; then - echo "<fc=#FF0000>$OUT</fc>°C" else - echo "$OUT°C" + echo "<fc=#FF0000>$OUT</fc>°C" fi |