Notifications on Task Completion

Like many in development-oriented roles, I’m frequently running long-executing tasks on my workstation, while I get on with a sword fight, or making a cup of coffee.

Compiling!

More seriously, I do often leave a software build, or packaging script running, while I context-switch to answer support requests, proof-read a blog post, or prepare for a meeting. Sometimes it’s nice to be reminded when that long-runner finishes, otherwise I might forget it’s sat there, all lonely in another workspace somewhere on my computer.

Terminal

Enter undistract-me by the ever-excellent Jonathan Lange. This solves the forgetfulness problem I have by pinging a desktop notification at me when a long-running task finishes in a terminal window somewhere on my machine. It’s super simple, and very handy.

Notification

If you’re afk getting a coffee, or just miss the notification while you’re looking out the window, no matter, you can see it alongside all the other notifications in your desktop.

Notifications

I install this on all of my Ubuntu desktop / laptop systems. You might want to as it’s pretty handy. I know some other Linux distributions have this kind of feature baked into their out-of-the-box experience, but Ubuntu doesn’t, so I install it myself.

Install

It’s in the Ubuntu repositories, so a simple apt install will install it.

$ sudo apt install undistract-me

Setup

If you’re like me, and use bash as your default shell, this one line will setup undistract-me.

$ echo 'source /etc/profile.d/undistract-me.sh' >> ~/.bashrc

That’s it!

Usage

Just use the terminal as you normally do. Any long running tasks will trigger a notification when they complete, if the terminal isn’t focused. Simple.

I personally find this great, as I’ll frequently get distracted, doing some other crucial piece of work, while a terminal sits diligently waiting for me…

Now I won’t forget about it!