Was given the idea on Reddit to suggest this feature here.
I am wondering whether something like undistract-me could be considered as a default package since it’s incredibly useful for new users to get terminal notifications for completed commands.
We did look at undistract-me at the Fit and Finish Sprint in London a couple of months ago. Sadly it requires X11 to request window IDs and therefore won’t work in a Wayland session.
Alternatively, undistract-me is tiny and not super well maintained. It wouldn’t be that hard to make a Wayland-specific version, or to make something even more Ubuntu specific than it already is.
There is some hack in .bashrc that could be added (like in Fedora) to do that. I didn’t have time this cycle to look at this properly, but I have this on my roadmap for 18.04
You want to see the GNOME bug, and the corresponding two branches. Upstream of vte/Terminal don’t like the solution, but Fedora carry it as distro patches.
An added complication is that we don’t source vte.sh on Ubuntu for non-login shells (such as those spawned by GNOME terminal/vte), so we have to find a way to do that too. When we talked about it a few years ago in the context of open-new-tab-in-the-cwd-of-current-tab (which FWIW is worked around in GNOME terminal), the bash maintainer (Matthias Klose [doko]) wasn’t happy with adding a non-login-shell equivalent. So part of this task is to speak with him and work out a solution, or otherwise find a way to get vte.sh to be active in terminals.