diff --git a/virtscreen/assets/data.json b/virtscreen/assets/data.json index 140980c..5ef5b88 100644 --- a/virtscreen/assets/data.json +++ b/virtscreen/assets/data.json @@ -34,7 +34,7 @@ "value": "arandr", "name": "ARandR", "args": "arandr", - "XDG_CURRENT_DESKTOP": [] + "XDG_CURRENT_DESKTOP": [""] } } } \ No newline at end of file diff --git a/virtscreen/qt_backend.py b/virtscreen/qt_backend.py index a2896c8..70f01bd 100644 --- a/virtscreen/qt_backend.py +++ b/virtscreen/qt_backend.py @@ -87,9 +87,8 @@ class Backend(QObject): # Default Display settings app for a Desktop Environment desktop_environ = os.environ.get('XDG_CURRENT_DESKTOP', '').lower() for key, value in data['displaySettingApps'].items(): - for de in value['XDG_CURRENT_DESKTOP']: - if de in desktop_environ: - config["displaySettingApp"] = key + if desktop_environ in value['XDG_CURRENT_DESKTOP']: + config["displaySettingApp"] = key # Save the new config with open(CONFIG_PATH, 'w') as f: f.write(json.dumps(config, indent=4, sort_keys=True))