diff --git a/data/preferences.json b/data/preferences.json index 2ac4a74..a51bf78 100644 --- a/data/preferences.json +++ b/data/preferences.json @@ -1,7 +1,7 @@ { "system": "Manjaro Gellivara 17", "default_locale": "en", - "autostart_path": "~/autostart/manjaro-hello.desktop", + "autostart_path": "~/.config/autostart/manjaro-hello.desktop", "data_path": "/usr/share/manjaro-hello/data/", "desktop_path": "/usr/share/applications/manjaro-hello.desktop", "installer_path": "/usr/bin/calamares", diff --git a/src/manjaro_hello.py b/src/manjaro_hello.py index 6ff9aba..b707417 100644 --- a/src/manjaro_hello.py +++ b/src/manjaro_hello.py @@ -177,12 +177,13 @@ class Hello(): :type autostart: bool """ try: - if autostart and not os.path.isfile(self.preferences["autostart_path"]): - os.symlink(self.preferences["desktop_path"], self.preferences["autostart_path"]) - elif not autostart and os.path.isfile(self.preferences["autostart_path"]): - os.unlink(self.preferences["autostart_path"]) + if autostart and not os.path.isfile(fix_path(self.preferences["autostart_path"])): + os.symlink(self.preferences["desktop_path"], + fix_path(self.preferences["autostart_path"])) + elif not autostart and os.path.isfile(fix_path(self.preferences["autostart_path"])): + os.unlink(fix_path(self.preferences["autostart_path"])) # Specific to i3 - i3_config = self.home_path + "/.i3/config" + i3_config = fix_path("~/.i3/config") if os.path.isfile(i3_config): i3_autostart = "exec --no-startup-id " + self.app with open(i3_config, "r+") as f: