Skip to content

Instantly share code, notes, and snippets.

@bonau
Last active December 24, 2015 19:29
Show Gist options
  • Select an option

  • Save bonau/6850520 to your computer and use it in GitHub Desktop.

Select an option

Save bonau/6850520 to your computer and use it in GitHub Desktop.
simple kitchen timer for ubuntu & awesome wm
#!/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