Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jerel
Created October 6, 2016 14:56
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 jerel/1fc7686263c9427522f945f755e0a724 to your computer and use it in GitHub Desktop.
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.
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