feat: add environment variable support for settings and theme file paths
This commit is contained in:
parent
3e4c9095d7
commit
eb4db2b910
2 changed files with 3 additions and 2 deletions
|
|
@ -8,7 +8,8 @@ Singleton {
|
||||||
|
|
||||||
property string shellName: "Noctalia"
|
property string shellName: "Noctalia"
|
||||||
property string settingsDir: (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
|
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
|
property var settings: settingAdapter
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ Singleton {
|
||||||
// FileView to load theme data from JSON file
|
// FileView to load theme data from JSON file
|
||||||
FileView {
|
FileView {
|
||||||
id: themeFile
|
id: themeFile
|
||||||
path: Settings.settingsDir + "Theme.json"
|
path: Settings.themeFile
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
onFileChanged: reload()
|
onFileChanged: reload()
|
||||||
onAdapterUpdated: writeAdapter()
|
onAdapterUpdated: writeAdapter()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue