Created
April 27, 2016 19:52
-
-
Save commanda/775ebcbe630919b554128b31c3dfb9dd to your computer and use it in GitHub Desktop.
a bash script that i use to tell me to get back to work after a set number of minutes
This file contains 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 | |
if [ "$#" -ne 1 ]; then | |
echo "usage: timey <number of minutes> &"; | |
exit; | |
fi | |
SECONDS=$(($1 * 60)) | |
echo "Timey set for $1 minutes, which is $SECONDS seconds" | |
sleep $SECONDS | |
open -a "Google Chrome.app" https://media.giphy.com/media/yWh7b6fWA5rJm/giphy.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those, like me, who are wondering what
-a
is for, here is the answer: