Merge branch 'main' into module/wifi
C++ / fmt (pull_request) Successful in 8s
JS/TS / fmt (pull_request) Successful in 11s
JS/TS / lint (pull_request) Successful in 15s
Python / static (pull_request) Successful in 54s
Rust / fmt (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 2m2s
C++ / build (pull_request) Successful in 4m0s
Rust / clippy (pull_request) Successful in 1m29s
Python / verify (pull_request) Successful in 3m13s
C++ / clang-tidy (pull_request) Successful in 5m7s
C++ / fmt (pull_request) Successful in 8s
JS/TS / fmt (pull_request) Successful in 11s
JS/TS / lint (pull_request) Successful in 15s
Python / static (pull_request) Successful in 54s
Rust / fmt (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 2m2s
C++ / build (pull_request) Successful in 4m0s
Rust / clippy (pull_request) Successful in 1m29s
Python / verify (pull_request) Successful in 3m13s
C++ / clang-tidy (pull_request) Successful in 5m7s
This commit is contained in:
@@ -17,7 +17,10 @@ Singleton {
|
||||
watchChanges: true
|
||||
|
||||
onAdapterUpdated: writeAdapter()
|
||||
onFileChanged: reload()
|
||||
onFileChanged: {
|
||||
reload();
|
||||
Wallpapers.previewColorLock = false;
|
||||
}
|
||||
|
||||
JsonAdapter {
|
||||
id: adapter
|
||||
|
||||
+28
-6
@@ -6,7 +6,7 @@ import Quickshell.Io
|
||||
import QtQuick
|
||||
import ZShell.Models
|
||||
import ZShell.Config
|
||||
import qs.Modules
|
||||
import qs.Services
|
||||
import qs.Helpers
|
||||
import qs.Paths
|
||||
|
||||
@@ -17,6 +17,8 @@ Searcher {
|
||||
property alias crops: adapter.monitorCrops
|
||||
readonly property string current: showPreview ? previewPath : actualCurrent
|
||||
property alias monitorCrops: monitorCrops
|
||||
property bool pendingPreviewClear
|
||||
property bool previewColorLock
|
||||
property string previewPath
|
||||
property bool recentlyChanged
|
||||
property bool showPreview: false
|
||||
@@ -34,9 +36,10 @@ Searcher {
|
||||
|
||||
function preview(path: string): void {
|
||||
previewPath = path;
|
||||
if (Config.general.color.schemeGeneration)
|
||||
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--image-path", `${previewPath}`, "--scheme", `${Config.colors.schemeType}`, "--mode", `${Config.general.color.mode}`]);
|
||||
showPreview = true;
|
||||
|
||||
if (Config.general.color.schemeGeneration)
|
||||
previewColorsProc.running = true;
|
||||
}
|
||||
|
||||
function setCrop(screen: string, rect: rect, zoom: real): void {
|
||||
@@ -52,7 +55,6 @@ Searcher {
|
||||
height: rect.height,
|
||||
zoom: zoom
|
||||
};
|
||||
// root.crops = updated;
|
||||
}
|
||||
|
||||
function setWallpaper(path: string): void {
|
||||
@@ -66,8 +68,10 @@ Searcher {
|
||||
|
||||
function stopPreview(): void {
|
||||
showPreview = false;
|
||||
if (Config.general.color.schemeGeneration)
|
||||
Quickshell.execDetached(["zshell-cli", "scheme", "generate", "--image-path", `${root.actualCurrent}`, "--scheme", `${Config.colors.schemeType}`, "--mode", `${Config.general.color.mode}`]);
|
||||
if (previewColorLock)
|
||||
pendingPreviewClear = true;
|
||||
else
|
||||
Colors.showPreview = false;
|
||||
}
|
||||
|
||||
extraOpts: useFuzzy ? ({}) : ({
|
||||
@@ -77,6 +81,11 @@ Searcher {
|
||||
list: wallpapers.entries
|
||||
useFuzzy: true
|
||||
|
||||
onPreviewColorLockChanged: {
|
||||
if (!previewColorLock && pendingPreviewClear)
|
||||
Colors.showPreview = false;
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function set(path: string): void {
|
||||
root.setWallpaper(path);
|
||||
@@ -118,4 +127,17 @@ Searcher {
|
||||
path: Config.general.wallpaperPath
|
||||
recursive: true
|
||||
}
|
||||
|
||||
Process {
|
||||
id: previewColorsProc
|
||||
|
||||
command: ["zshell-cli", "scheme", "generate", "-p", "-i", root.previewPath]
|
||||
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
Colors.load(text, true);
|
||||
Colors.showPreview = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user