Created
May 29, 2010 21:11
-
-
Save jakswa/418558 to your computer and use it in GitHub Desktop.
notifyme: timed notifications in ubuntu
This file contains 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/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this requires libnotify-bin to be installed: sudo apt-get install libnotify-bin