mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat: add environment variable support for settings and theme file paths
This commit is contained in:
@@ -8,7 +8,8 @@ Singleton {
|
||||
|
||||
property string shellName: "Noctalia"
|
||||
property string settingsDir: (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
|
||||
property string settingsFile: settingsDir + "Settings.json"
|
||||
property string settingsFile: Quickshell.env("NOCTALIA_SETTINGS_FILE") || (settingsDir + "Settings.json")
|
||||
property string themeFile: Quickshell.env("NOCTALIA_THEME_FILE") || (settingsDir + "Theme.json")
|
||||
property var settings: settingAdapter
|
||||
|
||||
Item {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Singleton {
|
||||
// FileView to load theme data from JSON file
|
||||
FileView {
|
||||
id: themeFile
|
||||
path: Settings.settingsDir + "Theme.json"
|
||||
path: Settings.themeFile
|
||||
watchChanges: true
|
||||
onFileChanged: reload()
|
||||
onAdapterUpdated: writeAdapter()
|
||||
|
||||
Reference in New Issue
Block a user