sudo apt-get install undistract-me
$ echo 'source /etc/profile.d/undistract-me.sh' >> ~/.bashrc
Reload your Bash configuration
To test, execute in your terminal a command that takes more than ten seconds, to complete, e.g.
and navigate away from your terminal to another window.
Once the command in the terminal completes, you should receive a desktop notification with the exit status of the command and the time it took.
The threshold of ten seconds can be configured
If you are happy with the new configuration, add the above to
~/.profile or similar and reload the file.