feat: add environment variable support for settings and theme file paths

This commit is contained in:
JPratama7 2025-07-26 16:50:29 +07:00
parent 3e4c9095d7
commit eb4db2b910
No known key found for this signature in database
GPG key ID: CD3EB7D0490C5F4B
2 changed files with 3 additions and 2 deletions

View file

@ -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 {

View file

@ -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()