Skip to content

Instantly share code, notes, and snippets.

@wteuber
Created January 18, 2016 14:25
Show Gist options
  • Save wteuber/4cad5dfc2a0b8fb82abf to your computer and use it in GitHub Desktop.
Save wteuber/4cad5dfc2a0b8fb82abf to your computer and use it in GitHub Desktop.
# Ubuntu
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1| sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Mac
alert () { osascript -e "display alert \"$1\"" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment