diff --git a/config/aurora/default.nix b/config/aurora/default.nix index 798bf9f..4313680 100644 --- a/config/aurora/default.nix +++ b/config/aurora/default.nix @@ -121,7 +121,7 @@ home.file.".config/aurora/settings.json".text = builtins.toJSON cfg.settings; - systemd.user.services.quickshell.Service.Environment = [ "SETTINGS=${config.home.homeDirectory}/${config.home.file.".config/aurora/settings.json".target}" ]; + systemd.user.services.quickshell.Service.Environment = [ "AURORA_SETTINGS=${config.home.homeDirectory}/${config.home.file.".config/aurora/settings.json".target}" ]; }; }; } diff --git a/config/aurora/modules/Bar.qml b/config/aurora/modules/Bar.qml index 9c0012c..c7ff02e 100644 --- a/config/aurora/modules/Bar.qml +++ b/config/aurora/modules/Bar.qml @@ -36,6 +36,13 @@ PanelWindow { bottom: true } + IpcHandler { + target: "shell" + function reload() { + Quickshell.reload(false) + } + } + Component.onCompleted: { diff --git a/config/aurora/modules/Settings.qml b/config/aurora/modules/Settings.qml index bce48ed..99b0210 100644 --- a/config/aurora/modules/Settings.qml +++ b/config/aurora/modules/Settings.qml @@ -15,17 +15,22 @@ Singleton { property bool launcherOpen: false - property string colorsDir: s_json.colorsDir - property string wallpaperDir: s_json.wallpaperDir - property string settingsDir: Quickshell.env("SETTINGS") + property string colorsPath: s_json.colorsPath + + property Process changeColors: Process { + command: [ s_json.changeColorsCmd ] + running: false + } + + property string settingsPath: Quickshell.env("AURORA_SETTINGS") onSettingsDirChanged: reload() function reload() { settings.reload() root.wallpaperDir = Qt.binding(() => s_json.wallpaperDir) - root.colorsDir = Qt.binding(() => s_json.colorsDir) + root.colorsPath = Qt.binding(() => s_json.colorsPath) root.wallpaper = Qt.binding(() => c_json.wallpaper) root.colors = Qt.binding(() => c_json.colors) } @@ -36,7 +41,7 @@ Singleton { id: settings - path: root.settingsDir + path: root.settingsPath watchChanges: true @@ -46,7 +51,9 @@ Singleton { id: s_json property string wallpaperDir - property string colorsDir + property string colorsPath + + property string changeColorsCmd } } @@ -65,7 +72,7 @@ Singleton { id: pywal - path: root.colorsDir + path: root.colorsPath watchChanges: true diff --git a/config/aurora/modules/Wallpaper.qml b/config/aurora/modules/Wallpaper.qml index d31b986..5052234 100644 --- a/config/aurora/modules/Wallpaper.qml +++ b/config/aurora/modules/Wallpaper.qml @@ -79,6 +79,7 @@ Flickable { onClicked: { sw.running = true + Settings.changeColors.running = true } } }