fix temp
This commit is contained in:
parent
995cab4b55
commit
56b5f9a359
|
@ -57,10 +57,10 @@ PRINT() {
|
||||||
if [ "$ENABLE_ITEM8" = "true" ]; then
|
if [ "$ENABLE_ITEM8" = "true" ]; then
|
||||||
if [ -e "${BINDIR}sensors" ]; then
|
if [ -e "${BINDIR}sensors" ]; then
|
||||||
if [ "$ITEM8_FORMAT_CELSIUS" = "true" ]; then
|
if [ "$ITEM8_FORMAT_CELSIUS" = "true" ]; then
|
||||||
echo "$SEPARATOR $ITEM8_ICON $(sensors | grep temp1 | awk '{ print $2 }')"
|
sensors | grep temp1 | awk '{ print $2 }' | grep -q "C" && echo "$SEPARATOR $ITEM8_ICON $(sensors | grep temp1 | awk '{ print $2 }')"
|
||||||
touch /tmp/iscelsius
|
touch /tmp/iscelsius
|
||||||
else
|
else
|
||||||
echo "$SEPARATOR $ITEM8_ICON $(sensors -f | grep temp1 | awk '{ print $2 }')"
|
sensors | grep temp1 | awk '{ print $2 }' | grep -q "F" && echo "$SEPARATOR $ITEM8_ICON $(sensors -f | grep temp1 | awk '{ print $2 }')"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -72,3 +72,7 @@ case "$ARG1" in
|
||||||
"--print") PRINT > /tmp/module_temp ;;
|
"--print") PRINT > /tmp/module_temp ;;
|
||||||
"--click") CLICK ;;
|
"--click") CLICK ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ "$(cat /tmp/module_temp | wc -c)" -lt "6" ]; then
|
||||||
|
rm -f /tmp/module_temp
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue