Skip to content

Instantly share code, notes, and snippets.

@vagnerzampieri
Last active December 19, 2015 03:18
Show Gist options
  • Select an option

  • Save vagnerzampieri/5889092 to your computer and use it in GitHub Desktop.

Select an option

Save vagnerzampieri/5889092 to your computer and use it in GitHub Desktop.
Para alertar se um comando foi encerrado.
# sudo apt-get install libnotify-bin
# para testar
# sleep 5; alert
alias alert_helper='history|tail -n1|sed -e "s/^\s*[0-9]\+\s*//" -e "s/;\s*alert$//"'
alias alert='notify-send -i /usr/share/icons/gnome/32x32/apps/gnome-terminal.png "[$?] $(alert_helper)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment