Skip to content

Instantly share code, notes, and snippets.

@vwxyzjn
Created October 28, 2020 17:44
Show Gist options
  • Select an option

  • Save vwxyzjn/c2d4ea6fb9d1afa721d266ed72fcbdbd to your computer and use it in GitHub Desktop.

Select an option

Save vwxyzjn/c2d4ea6fb9d1afa721d266ed72fcbdbd to your computer and use it in GitHub Desktop.
Get a notification when my commands are done
### Linux:
# https://askubuntu.com/questions/656603/alert-when-terminal-program-finishes-running
# temporary
alias sd="notify-send 'DONE'"
# permanent
echo "alias sd=\"notify-send 'DONE'\"" >> ~/.bashrc
echo "alias sd=\"notify-send 'DONE'\"" >> ~/.zshrc
### Macos:
# https://apple.stackexchange.com/questions/9412/how-to-get-a-notification-when-my-commands-are-done#_=_
# temporary
alias sd='terminal-notifier -title "Terminal" -message "Done with task!"'
# permanent
echo "alias sd='terminal-notifier -title \"Terminal\" -message \"Done with task!\"'" >> ~/.bashrc
echo "alias sd='terminal-notifier -title \"Terminal\" -message \"Done with task!\"'" >> ~/.zshrc
### Usuage:
$ sleep 5 ; sd # sd is short hand for 'say done'
$ long_running_tasks ; sd # sd is short hand for 'say done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment