aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-21 16:03:08 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-21 16:03:08 +0100
commitd23a1092b35b8d0cbf469674ac02f006ba2ecde1 (patch)
tree096f3ef5e04245e885e3633ab2f6915ece96f483
parent9ab79eebfcb66e73cd8aa9b82a42a5e34f422aa5 (diff)
downloadayatana-settings-d23a1092b35b8d0cbf469674ac02f006ba2ecde1.tar.gz
ayatana-settings-d23a1092b35b8d0cbf469674ac02f006ba2ecde1.tar.bz2
ayatana-settings-d23a1092b35b8d0cbf469674ac02f006ba2ecde1.zip
ayatana-settings: Create ~/.config/autostart folder if it does not yet exist.
-rwxr-xr-xayatana-settings7
1 files changed, 6 insertions, 1 deletions
diff --git a/ayatana-settings b/ayatana-settings
index 7daae0a..78db62a 100755
--- a/ayatana-settings
+++ b/ayatana-settings
@@ -226,7 +226,12 @@ class AyatanaSettings:
else:
'''
- sPath = '~/.config/autostart/ayatana-indicator-{}.desktop'.format(sIndicator)
+ sAutostartFolder = '~/.config/autostart'
+ pAutostartFolder = pathlib.Path(sAutostartFolder).expanduser()
+ if not pAutostartFolder.exists():
+ pAutostartFolder.mkdir(parents=True)
+
+ sPath = '{autostart}/ayatana-indicator-{indicator}.desktop'.format(autostart=sAutostartFolder, indicator=sIndicator)
pPath = pathlib.Path(sPath).expanduser()
if not pPath.exists():