diff --git a/Config/Config.qml b/Config/Config.qml index 20384a9..791e3db 100644 --- a/Config/Config.qml +++ b/Config/Config.qml @@ -122,8 +122,11 @@ Singleton { return { logo: general.logo, wallpaperPath: general.wallpaperPath, - wallust: general.wallust, - schemeGeneration: general.schemeGeneration, + color: { + wallust: general.color.wallust, + mode: general.color.mode, + schemeGeneration: general.color.schemeGeneration, + }, apps: { terminal: general.apps.terminal, audio: general.apps.audio, diff --git a/Config/General.qml b/Config/General.qml index 40968b7..0e57cf0 100644 --- a/Config/General.qml +++ b/Config/General.qml @@ -4,11 +4,16 @@ import Quickshell JsonObject { property string logo: "" property string wallpaperPath: Quickshell.env("HOME") + "/Pictures/Wallpapers" - property bool wallust: false - property bool schemeGeneration: true + property Color color: Color {} property Apps apps: Apps {} property Idle idle: Idle {} + component Color: JsonObject { + property bool wallust: false + property bool schemeGeneration: true + property string mode: "dark" + } + component Apps: JsonObject { property list terminal: ["kitty"] property list audio: ["pavucontrol"] diff --git a/Helpers/Wallpapers.qml b/Helpers/Wallpapers.qml index 6606220..9240135 100644 --- a/Helpers/Wallpapers.qml +++ b/Helpers/Wallpapers.qml @@ -27,14 +27,14 @@ Searcher { function preview(path: string): void { previewPath = path; if ( Config.general.schemeGeneration ) - Quickshell.execDetached(["sh", "-c", `zshell-cli scheme generate --image-path=${previewPath} --thumbnail-path=${Paths.cache}/imagecache/thumbnail.jpg --output=${Paths.state}/scheme.json --scheme=${Config.colors.schemeType}`]); + Quickshell.execDetached(["sh", "-c", `zshell-cli scheme generate --image-path ${previewPath} --thumbnail-path ${Paths.cache}/imagecache/thumbnail.jpg --output ${Paths.state}/scheme.json --scheme ${Config.colors.schemeType} --mode ${Config.general.color.mode}`]); showPreview = true; } function stopPreview(): void { showPreview = false; if ( Config.general.schemeGeneration ) - Quickshell.execDetached(["sh", "-c", `zshell-cli scheme generate --image-path=${root.actualCurrent} --thumbnail-path=${Paths.cache}/imagecache/thumbnail.jpg --output=${Paths.state}/scheme.json --scheme=${Config.colors.schemeType}`]); + Quickshell.execDetached(["sh", "-c", `zshell-cli scheme generate --image-path ${root.actualCurrent} --thumbnail-path ${Paths.cache}/imagecache/thumbnail.jpg --output ${Paths.state}/scheme.json --scheme ${Config.colors.schemeType} --mode ${Config.general.color.mode}`]); } list: wallpapers.entries diff --git a/Modules/TrayItem.qml b/Modules/TrayItem.qml index becd8a9..e2eb390 100644 --- a/Modules/TrayItem.qml +++ b/Modules/TrayItem.qml @@ -39,21 +39,31 @@ Item { } } - Image { - id: icon + ColoredIcon { + id: icon - property bool batteryHDPI: root.bar.screen.x < 0 && root.item.icon.includes("battery") - property bool nmHDPI: root.bar.screen.x < 0 && root.item.icon.includes("nm-") + anchors.centerIn: parent + source: root.item.icon + implicitSize: 22 + color: DynamicColors.palette.m3onSurface + layer.enabled: DynamicColors.light + } - anchors.centerIn: parent - width: batteryHDPI ? 26 : ( nmHDPI ? 25 : 22 ) - height: batteryHDPI ? 26 : ( nmHDPI ? 25 : 22 ) - source: root.item.icon - mipmap: true - smooth: ( batteryHDPI || nmHDPI ) ? false : true - asynchronous: true - sourceSize.width: ( batteryHDPI || nmHDPI ) ? 16 : 22 - sourceSize.height: ( batteryHDPI || nmHDPI ) ? 16 : 22 - fillMode: Image.PreserveAspectFit - } + // Image { + // id: icon + // + // property bool batteryHDPI: root.bar.screen.x < 0 && root.item.icon.includes("battery") + // property bool nmHDPI: root.bar.screen.x < 0 && root.item.icon.includes("nm-") + // + // anchors.centerIn: parent + // width: batteryHDPI ? 26 : ( nmHDPI ? 25 : 22 ) + // height: batteryHDPI ? 26 : ( nmHDPI ? 25 : 22 ) + // source: root.item.icon + // mipmap: true + // smooth: ( batteryHDPI || nmHDPI ) ? false : true + // asynchronous: true + // sourceSize.width: ( batteryHDPI || nmHDPI ) ? 16 : 22 + // sourceSize.height: ( batteryHDPI || nmHDPI ) ? 16 : 22 + // fillMode: Image.PreserveAspectFit + // } } diff --git a/cli/src/zshell/subcommands/__pycache__/scheme.cpython-313.pyc b/cli/src/zshell/subcommands/__pycache__/scheme.cpython-313.pyc index ce31c6b..71fa4f8 100644 Binary files a/cli/src/zshell/subcommands/__pycache__/scheme.cpython-313.pyc and b/cli/src/zshell/subcommands/__pycache__/scheme.cpython-313.pyc differ diff --git a/cli/src/zshell/subcommands/scheme.py b/cli/src/zshell/subcommands/scheme.py index aa9a98c..c1db4e1 100644 --- a/cli/src/zshell/subcommands/scheme.py +++ b/cli/src/zshell/subcommands/scheme.py @@ -92,11 +92,6 @@ def generate( is_dark = mode.lower() == "dark" - if is_dark: - seed = Hct.from_hct(seed.hue, seed.chroma, min(seed.tone, 20)) - else: - seed = Hct.from_hct(seed.hue, seed.chroma, max(seed.tone, 70)) - scheme = Scheme( seed, is_dark,