pulb / mailnag

An extensible mail notification daemon
GNU General Public License v2.0
250 stars 32 forks source link

libnotifyplugin: Extend check for is_gnome #216

Closed denisiko closed 3 years ago

denisiko commented 3 years ago

Following changes will extend the GNOME environment check in the libnotify plugin:

1) Two env vars are checked instead of one by adding XDG_CURRENT_DESKTOP. 2) The check is changed from exact match of "gnome" to a check for the string's ending.

With this the request intends to solve #146 by having a more inclusive check because GDMSESSION seems to not be sufficient for identifying if GNOME is used (on my Ubuntu machine the value is just "ubuntu"). XDG_CURRENT_DESKTOP seems to have needed info on most environments: On Ubuntu it is "ubuntu:GNOME", on Budgie "Budgie:GNOME" and on Fedora "GNOME-Classic:GNOME". This is why a check for endswith('gnome') should account for most cases.

pulb commented 3 years ago

Merged, thanks!

denisiko commented 3 years ago

Whoah, that was fast! The splitting of envar values by colon is also way better than my approach.

Could you maybe say when the next release will approximately be?