We are all lazy and we get distracted. One thing happens often… You run some slow command in your shell, switch to the browser, and bam… you are distracted.
What about sending an OS notification? Every time any command needs longer to run than let’s say 10 seconds then there is some notification to show so you can get right back to work each time.
Note: This is for Fish shell, which is a modern shell and really nice to use.
After each command a new line is printed and the shell prints out the prompt.
At that time, we could provide a notification.
Let’s create a new file and call it functions/rprompt.fish
Reference rprompt.fish inside the main fish config file: