Last active
December 24, 2015 19:29
-
-
Save bonau/6850520 to your computer and use it in GitHub Desktop.
simple kitchen timer for ubuntu & awesome wm
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 | |
| # Requirements: sox freedesktop-sound-theme | |
| # Arguments | |
| SLEEPARG=`zenity --entry --title="Kitchen Timer" \ | |
| --text="Enter time in minutes."` | |
| if [[ $? -eq 1 ]]; then | |
| exit | |
| fi | |
| SLEEPARG=$(( $SLEEPARG * 60 )) | |
| TEXTARG=`zenity --entry --title="Kitchen Time" \ | |
| --text="Give it some love messages." --entry-text="Time to go kitchen"` | |
| if [[ $? -eq 1 ]]; then | |
| exit | |
| fi | |
| # ...z...Z | |
| sleep $SLEEPARG | |
| # Time's up! | |
| play /usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga -q & | |
| notify-send "Kitchen Timer" "$TEXTARG" -u critical | |
| # Alternatives | |
| #zenity --info --title="Kitchen Timer" --text="Time to go kitchen." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment