Skip to content
Snippets Groups Projects
Commit de801466 authored by nimrod's avatar nimrod
Browse files

Fallback to bell when notify-send is not present.

parent 1c8bad38
Branches
No related tags found
No related merge requests found
...@@ -96,6 +96,7 @@ alias http-server='python3 -m http.server 8080' ...@@ -96,6 +96,7 @@ alias http-server='python3 -m http.server 8080'
alias dd='monitor dd status=progress' alias dd='monitor dd status=progress'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete' alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias bell='printf \a' alias bell='printf \a'
command -v notify-send > /dev/null || alias notify-send='bell'
monitor () { monitor () {
eval "$@" && notify-send "${1#__} has finished." || notify-send --urgency=critical "${1#__} has failed." eval "$@" && notify-send "${1#__} has finished." || notify-send --urgency=critical "${1#__} has failed."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment