Skip to content

Instantly share code, notes, and snippets.

@tylerneylon
Last active April 28, 2016 21:12
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 tylerneylon/133c9036053f8e7b820c9e686b3a5297 to your computer and use it in GitHub Desktop.
Save tylerneylon/133c9036053f8e7b820c9e686b3a5297 to your computer and use it in GitHub Desktop.
A simple bash function to help you stay focused.
timey() {
# Inspired by
# https://gist.github.com/commanda/775ebcbe630919b554128b31c3dfb9dd
if [ "$#" -ne 1 ]; then
echo "usage: timey <number of minutes>"
return
fi
url=https://media.giphy.com/media/yWh7b6fWA5rJm/giphy.gif
seconds=$(( $1 * 60 ))
((sleep $seconds; open -a "Google Chrome.app" $url) &)
if [ $1 -eq 1 ]; then
echo Timey set for $1 minute.
else
echo Timey set for $1 minutes.
fi
}
@tylerneylon
Copy link
Author

Props to @commanda for this idea and making the original version.

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