1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-02-12 11:21:53 +00:00

Fixed parsing of configuration file so that desktop environment is correctly correlated with the display setting app, according to the data.json configuration.

This commit is contained in:
Luke Anderson 2018-11-04 01:53:39 +01:00 committed by Bumsik Kim
parent 3e997c596a
commit 9047091dd0
2 changed files with 3 additions and 4 deletions

View file

@ -34,7 +34,7 @@
"value": "arandr",
"name": "ARandR",
"args": "arandr",
"XDG_CURRENT_DESKTOP": []
"XDG_CURRENT_DESKTOP": [""]
}
}
}

View file

@ -87,8 +87,7 @@ 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:
if desktop_environ in value['XDG_CURRENT_DESKTOP']:
config["displaySettingApp"] = key
# Save the new config
with open(CONFIG_PATH, 'w') as f: