2 ms·
I use: ``` #!/usr/bin/env bash set -u title=${2:-Shell} msg=$1 osascript -e "display notification \"$1\" with title \"$title\"" ``` As
by renewiltord 3y ago
I use:
```
#!/usr/bin/env bash
set -u
title=${2:-Shell}
msg=$1
osascript -e "display notification \"$1\" with title \"$title\""
```
As `~/bin/,notify` and put it at the end of long-running commands:
```
run_this_program && ,notify "Long program is done!"
```
- Svetlitski 3y agoI can’t help but ask, why “,notify” and not just “notify”?
- renewiltord 3y agoI name all my personal programs prefixed by the comma. I learnt it from someone on lobste.rs. No Unix utilities use the prefix in their name and it is a valid filename. So I can type , and I am sure it's my program and I'm not running something else and it'll autocomplete among my list of programs.
- wpm 3y agoThis is a very cool idea, I always hesitate to add a lot of aliases to my zshrc since I never want to step on any toes.
- inanutshellus 3y agoan upvote wasn't enough! this is cool, thanks for sharing.