Currently when toggling on Modern mode, os.environ is used like a dictionary and breaks with a KeyError when XDG_CURRENT_DESKTOP isn't set. os.environ has a get() method that can be used and also return a default string if nothing is found so Modern mode doesn't break when XDG_CURRENT_DESKTOP is missing/unset.
The current implementation (alttoolbar_type.py | line 1547):
os.environ["XDG_CURRENT_DESKTOP"].find("GNOME") == -1
It didn't seem like something important enough for a pull request, but it did break usability enough that I couldn't go back to the plugins settings to disable Modern mode when it happened.
Currently when toggling on Modern mode, os.environ is used like a dictionary and breaks with a KeyError when XDG_CURRENT_DESKTOP isn't set. os.environ has a get() method that can be used and also return a default string if nothing is found so Modern mode doesn't break when XDG_CURRENT_DESKTOP is missing/unset.
The current implementation (alttoolbar_type.py | line 1547):
os.environ["XDG_CURRENT_DESKTOP"].find("GNOME") == -1
Suggested change:
os.environ.get("XDG_CURRENT_DESKTOP","DESKTOP_NOT_SET").find("GNOME") == -1
It didn't seem like something important enough for a pull request, but it did break usability enough that I couldn't go back to the plugins settings to disable Modern mode when it happened.