Skip to content

Instantly share code, notes, and snippets.

@jakswa
Created May 29, 2010 21:11
Show Gist options
  • Save jakswa/418558 to your computer and use it in GitHub Desktop.
Save jakswa/418558 to your computer and use it in GitHub Desktop.
notifyme: timed notifications in ubuntu
#!/bin/sh
# I wrote this to create timed notifications in ubuntu
# Usage: notifyme <time> <title> [text]
# Example command: notifyme 5s "Title" "Msg text"
# Being input with Alt-F2: http://i.imgur.com/u5SCP.jpg
# example result: http://i.imgur.com/xFS9x.jpg
if which notify-send > /dev/null; then
if [ -n "$1" ] && [ -n "$2" ]; then
sleep $1 && notify-send "$2" "$3" &
else
echo "usage: notifyme <time> <msg> [header]"
fi
else
echo "libnotify-bin is not installed"
echo "use: sudo apt-get install libnotify-bin"
fi
@jakswa
Copy link
Author

jakswa commented May 29, 2010

this requires libnotify-bin to be installed: sudo apt-get install libnotify-bin

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