Skip to content

Instantly share code, notes, and snippets.

@matheusfaustino
Last active December 8, 2017 16:03
Show Gist options
  • Save matheusfaustino/cde6809c682ef69f2cda13bd2c42aaef to your computer and use it in GitHub Desktop.
Save matheusfaustino/cde6809c682ef69f2cda13bd2c42aaef to your computer and use it in GitHub Desktop.
Command to display a window, after X minutes, to remeber you of something. If you have something very important going on, cancel it, it will try again after 5 minutes.
# warning me (Linux)
# usage: warning_me <minute> <text>
# warning_me 5 "Take Coffee"
warning_me () {
sleep "${1}m"
zenity --question --text="$2" --title="Warning Me" 2> /dev/null
if [ $? -eq 1 ]; then
warning_me 5 $2
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment