franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
779 stars 71 forks source link

Use correct terminal icon for Linux notifications #84

Closed liblit closed 4 years ago

liblit commented 4 years ago

terminal is not among the Freedesktop standard icon names. On GNOME 3.36 as shipped with Fedora 32, this results in a notification with an generic placeholder icon:

image

The proper standard icon name is utilities-terminal, which results in a notification with a suitable terminal icon:

image

franciscolourenco commented 4 years ago

@liblit does this have the potential of breaking the icon on other desktops? thanks!

liblit commented 4 years ago

does this have the potential of breaking the icon on other desktops?

That seems unlikely, given that we are changing from a non-standard icon to one that is explicitly listed in the Icon Naming Specification's table of standard icon names.

As an extra check, I spun up an Ubuntu 16.04 virtual machine running in GNOME Boxes. I chose this as an older, mainstream, GNOME-based distribution that is not Fedora. I tried the following three commands:

  1. notify-send --icon=terminal Foo presented a notification with a terminal icon. This is what done uses today.
  2. notify-send --icon=utilities-terminal Foo presented a notification with a terminal icon. This is what the current pull request suggests changing to.
  3. notify-send --icon=utilities-terminal-xxx Foo presented a notification with no icon. This is just a smoke test to verify that it is possible to have an invalid icon name, and therefore to see no icon.

I'm happy to try any other platform you'd like me to test, provided it's something that I can bring up as a GNOME Boxes virtual machine without too much hassle.

franciscolourenco commented 4 years ago

Good enough, thank you for the PR!