Skip to content

Instantly share code, notes, and snippets.

@cympfh
Created May 12, 2014 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cympfh/ac2178eedaa7df87fda1 to your computer and use it in GitHub Desktop.
Save cympfh/ac2178eedaa7df87fda1 to your computer and use it in GitHub Desktop.
#!/bin/bash
PREVONDO=0
while true; do
ONDO=`sensors | tail -2 | head -1 | cut -d'+' -f2 | cut -d '.' -f1`
if [[ $PREVONDO > 71 && $ONDO < 72 ]]; then
xdotool mousemove 2000 300 click 3
echo LOW $ONDO
fi
if [[ $PREVONDO < 90 && $ONDO > 89 ]]; then
xdotool mousemove 2000 300 click 3
echo HIGH $ONDO
fi
echo NORMAL $ONDO
PREVONDO=$ONDO
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment