Adding terminal notifications for completed commands to the default desktop?

Hey guys,

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.

I think eOS has this feature, too.

What are your thoughts?

Yours,

Robert

4 Likes

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.

5 Likes

Thanks, @Wimpress! I guess there is no Wayland-compatible alternative yet, right?

FYI:

There are no plans.

I’d be happy to accept a PR that replaced the X-specific stuff with something that worked for both X and Wayland.

https://github.com/jml/undistract-me/blob/master/long-running.bash#L47-L54 might be a good place to start.

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.

https://github.com/jml/undistract-me/issues/49#issuecomment-334125128

1 Like

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 :wink:

8 Likes

Glad to hear it’s on the roadmap. It’s something I’ve seen in elementary OS and been quite envious of :slight_smile:

1 Like

Awesome, thanks for taking the (future) time to work on this, @didrocks! :slight_smile:

1 Like

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.

3 Likes