From 8cc2b14ad10e44062c2c89ec2f97dd06114de7ae Mon Sep 17 00:00:00 2001 From: Zacharias-Brohn Date: Sat, 21 Mar 2026 12:20:55 +0100 Subject: [PATCH] remove wallust, fix enabled switch for schedule dark mode --- Config/Config.qml | 1 - Config/General.qml | 1 - Greeter/Config/Config.qml | 1 - Greeter/Config/General.qml | 1 - Helpers/ModeScheduler.qml | 15 +++++---------- Helpers/Wallust.qml | 26 -------------------------- 6 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 Helpers/Wallust.qml diff --git a/Config/Config.qml b/Config/Config.qml index 9946f0b..6e4206c 100644 --- a/Config/Config.qml +++ b/Config/Config.qml @@ -174,7 +174,6 @@ Singleton { wallpaperPath: general.wallpaperPath, desktopIcons: general.desktopIcons, color: { - wallust: general.color.wallust, mode: general.color.mode, smart: general.color.smart, scheduleDark: general.color.scheduleDark, diff --git a/Config/General.qml b/Config/General.qml index 318faec..ff1e21e 100644 --- a/Config/General.qml +++ b/Config/General.qml @@ -26,7 +26,6 @@ JsonObject { property int scheduleDarkStart: 0 property bool schemeGeneration: true property bool smart: false - property bool wallust: false } component Idle: JsonObject { property list timeouts: [ diff --git a/Greeter/Config/Config.qml b/Greeter/Config/Config.qml index 656727b..fad254a 100644 --- a/Greeter/Config/Config.qml +++ b/Greeter/Config/Config.qml @@ -175,7 +175,6 @@ Singleton { username: general.username, desktopIcons: general.desktopIcons, color: { - wallust: general.color.wallust, mode: general.color.mode, smart: general.color.smart, schemeGeneration: general.color.schemeGeneration, diff --git a/Greeter/Config/General.qml b/Greeter/Config/General.qml index 733dd53..453c2f3 100644 --- a/Greeter/Config/General.qml +++ b/Greeter/Config/General.qml @@ -26,7 +26,6 @@ JsonObject { property int scheduleDarkStart: 0 property bool schemeGeneration: true property bool smart: false - property bool wallust: false } component Idle: JsonObject { property list timeouts: [ diff --git a/Helpers/ModeScheduler.qml b/Helpers/ModeScheduler.qml index 9ca6d40..bc1c09c 100644 --- a/Helpers/ModeScheduler.qml +++ b/Helpers/ModeScheduler.qml @@ -12,6 +12,7 @@ Singleton { readonly property int darkEnd: Config.general.color.scheduleDarkEnd readonly property int darkStart: Config.general.color.scheduleDarkStart + readonly property bool enabled: Config.general.color.scheduleDark function applyDarkMode() { if (Config.general.color.schemeGeneration) { @@ -27,9 +28,6 @@ Singleton { Quickshell.execDetached(["sh", "-c", `sed -i 's/color_scheme_path=\\(.*\\)Light.colors/color_scheme_path=\\1Dark.colors/' ${Paths.home}/.config/qt6ct/qt6ct.conf`]); Quickshell.execDetached(["sed", "-i", "'s/\\(vim.cmd.colorscheme \\).*/\\1\"tokyodark\"/'", "~/.config/nvim/lua/config/load-colorscheme.lua"]); - - if (Config.general.color.wallust) - Wallust.generateColors(WallpaperPath.currentWallpaperPath); } function applyLightMode() { @@ -47,9 +45,6 @@ Singleton { if (Config.general.color.neovimColors) Quickshell.execDetached(["sed", "-i", "'s/\\(vim.cmd.colorscheme \\).*/\\1\"onelight\"/'", "~/.config/nvim/lua/config/load-colorscheme.lua"]); - - if (Config.general.color.wallust) - Wallust.generateColors(WallpaperPath.currentWallpaperPath); } function checkStartup() { @@ -71,15 +66,15 @@ Singleton { running: true onTriggered: { - if (darkStart === darkEnd) + if (!root.enabled) return; var now = new Date(); - if (now.getHours() >= darkStart || now.getHours() < darkEnd) { + if (now.getHours() >= root.darkStart || now.getHours() < root.darkEnd) { if (DynamicColors.light) - applyDarkMode(); + root.applyDarkMode(); } else { if (!DynamicColors.light) - applyLightMode(); + root.applyLightMode(); } } } diff --git a/Helpers/Wallust.qml b/Helpers/Wallust.qml deleted file mode 100644 index 9b7e83d..0000000 --- a/Helpers/Wallust.qml +++ /dev/null @@ -1,26 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick -import qs.Config - -Singleton { - id: root - - property var args - readonly property string mode: Config.general.color.mode - readonly property string threshold: mode === "dark" ? "--threshold=9" : "--dynamic-threshold" - - function generateColors(wallpaperPath) { - root.args = wallpaperPath; - wallustProc.running = true; - } - - Process { - id: wallustProc - - command: ["wallust", "run", root.args, `--palette=${root.mode}`, "--ignore-sequence=cursor", `${root.threshold}`] - running: false - } -}