Created
October 6, 2016 14:56
-
-
Save jerel/1fc7686263c9427522f945f755e0a724 to your computer and use it in GitHub Desktop.
A bash function I use to force me to do pushups every 30 minutes throughout the work day.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
work() { | |
while true; do | |
sleep 1800 #30 min | |
espeak "$1 pushups" | |
xinput set-prop 14 'Device Enabled' 0 #disable keyboard | |
xinput set-prop 16 'Device Enabled' 0 #disable mouse | |
xset dpms force off #disable monitors | |
sleep 15 | |
xinput set-prop 14 'Device Enabled' 1 | |
xinput set-prop 16 'Device Enabled' 1 | |
xset dpms force on | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment