auto light/dark scheme
This commit is contained in:
@@ -10,6 +10,7 @@ Scope {
|
||||
property bool launcherInterrupted
|
||||
readonly property bool hasFullscreen: Hypr.focusedWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2) ?? false
|
||||
|
||||
|
||||
CustomShortcut {
|
||||
name: "toggle-launcher"
|
||||
description: "Toggle launcher"
|
||||
|
||||
+4
-1
@@ -3,11 +3,14 @@ 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;
|
||||
@@ -16,7 +19,7 @@ Singleton {
|
||||
|
||||
Process {
|
||||
id: wallustProc
|
||||
command: ["wallust", "run", root.args, "--palette=dark", "--ignore-sequence=cursor", "--threshold=9" ]
|
||||
command: ["wallust", "run", root.args, `--palette=${root.mode}`, "--ignore-sequence=cursor", `${root.threshold}` ]
|
||||
running: false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user