Skip to content

Instantly share code, notes, and snippets.

@fongreecss
Last active April 27, 2016 18:33
Show Gist options
  • Save fongreecss/b1f2e1b299a9709d46d252114972af96 to your computer and use it in GitHub Desktop.
Save fongreecss/b1f2e1b299a9709d46d252114972af96 to your computer and use it in GitHub Desktop.
put line in .bashrc or better in .bash_aliases
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$//'\'')"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment