diff options
-rwxr-xr-x | configs/xmobar_cputemp.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/configs/xmobar_cputemp.sh b/configs/xmobar_cputemp.sh index 05f9f19..4452f10 100755 --- a/configs/xmobar_cputemp.sh +++ b/configs/xmobar_cputemp.sh @@ -1,18 +1,18 @@ #!/bin/sh if [ "x$1" = "xCPU" ]; then - OUT=$(sensors | sed -n 's/^CPU Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p') + OUT=$(sensors | sed -n 's/^\(Physical\|Package\) id 0:\s*+\(.*\)\..*°C\s*(\(.*\)/\2/p') elif [ "x$1" = "xMB" ]; then - OUT=$(sensors | sed -n 's/^MB Temperature:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p') + OUT=$(sensors | sed -n 's/^temp1:\s*+\(.*\)\..*°C\s*(\(.*\)/\1/p') else exit 1 fi -if [ $OUT -le 60 ]; then +if [ $OUT -le 50 ]; then echo "$OUT°C" -elif [ $OUT -le 75 ]; then +elif [ $OUT -le 65 ]; then echo "<fc=#00FF00>$OUT</fc>°C" -elif [ $OUT -le 85 ]; then +elif [ $OUT -le 75 ]; then echo "<fc=#FFFF00>$OUT</fc>°C" else echo "<fc=#FF0000>$OUT</fc>°C" |