Fix autostart activation
This commit is contained in:
parent
3fd589995f
commit
c5911b3872
@ -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",
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user