Created
October 1, 2015 07:59
-
-
Save pschwede/8fd79f8200a27e94a8ad to your computer and use it in GitHub Desktop.
Reminder to drink a glass every two hours.
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
#!/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