Skip to content

Instantly share code, notes, and snippets.

@commanda
Created April 27, 2016 19:52
Show Gist options
  • Save commanda/775ebcbe630919b554128b31c3dfb9dd to your computer and use it in GitHub Desktop.
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
#!/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
@joelfranusic-okta
Copy link

For those, like me, who are wondering what -a is for, here is the answer:

     -a application
         Specifies the application to use for opening the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment