Skip to content

Instantly share code, notes, and snippets.

@pschwede
Created October 1, 2015 07:59
Show Gist options
  • Save pschwede/8fd79f8200a27e94a8ad to your computer and use it in GitHub Desktop.
Save pschwede/8fd79f8200a27e94a8ad to your computer and use it in GitHub Desktop.
Reminder to drink a glass every two hours.
#!/bin/bash
### Remind me to drink a glass every two hours.
# WHO recommends 3 Liters per day. I am abound 16 hours awake. My glass can hold 0.4 Liters.
# 400ml / (3l / 16h) = 2.133h; which would include a factor of savety of 1.07 ;)
###
while true; do
notify-send "drink a drink";
sleep $(echo "7200 - 3600*("$(date +%k)" % 2) - 60*("$(date +%M)") - "$(date +%S) | bc)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment