remove wallust, fix enabled switch for schedule dark mode

This commit is contained in:
Zacharias-Brohn
2026-03-21 12:20:55 +01:00
parent d839f32196
commit 8cc2b14ad1
6 changed files with 5 additions and 40 deletions
-1
View File
@@ -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,
-1
View File
@@ -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<var> timeouts: [
-1
View File
@@ -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,
-1
View File
@@ -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<var> timeouts: [
+5 -10
View File
@@ -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();
}
}
}
-26
View File
@@ -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
}
}