From 074f8ed902a2bcfd982a5b06a44521a7575c27d9 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 15 Sep 2025 21:52:58 +0200 Subject: [PATCH] wallpaper selector: allow making system picker the default --- .config/quickshell/ii/modules/common/Config.qml | 6 +++++- .../wallpaperSelector/WallpaperSelector.qml | 14 ++++++++++---- .../wallpaperSelector/WallpaperSelectorContent.qml | 7 ++++++- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 425fe913..c95b148c 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -338,7 +338,11 @@ Singleton { property int longBreak: 900 } } - + + property JsonObject wallpaperSelector: JsonObject { + property bool useSystemFileDialog: false + } + property JsonObject windows: JsonObject { property bool showTitlebar: true // Client-side decoration for shell apps property bool centerTitle: true diff --git a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelector.qml b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelector.qml index 0984c85f..43ebc31c 100644 --- a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelector.qml +++ b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelector.qml @@ -57,19 +57,25 @@ Scope { } } + function toggleWallpaperSelector() { + if (Config.options.wallpaperSelector.useSystemFileDialog) { + Wallpapers.openFallbackPicker(Appearance.m3colors.darkmode); + return; + } + GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen + } + IpcHandler { target: "wallpaperSelector" function toggle(): void { - GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen + root.toggleWallpaperSelector(); } } GlobalShortcut { name: "wallpaperSelectorToggle" description: "Toggle wallpaper selector" - onPressed: { - GlobalStates.wallpaperSelectorOpen = !GlobalStates.wallpaperSelectorOpen; - } + onPressed: root.toggleWallpaperSelector(); } } diff --git a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml index 6e2d2ff9..bc25ce66 100644 --- a/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml +++ b/.config/quickshell/ii/modules/wallpaperSelector/WallpaperSelectorContent.qml @@ -316,12 +316,17 @@ MouseArea { Wallpapers.openFallbackPicker(root.useDarkMode); GlobalStates.wallpaperSelectorOpen = false; } + altAction: () => { + Wallpapers.openFallbackPicker(root.useDarkMode); + GlobalStates.wallpaperSelectorOpen = false; + Config.options.wallpaperSelector.useSystemFileDialog = true + } contentItem: MaterialSymbol { text: "open_in_new" iconSize: Appearance.font.pixelSize.larger } StyledToolTip { - content: Translation.tr("Use the system file picker instead") + content: Translation.tr("Use the system file picker instead\nRight-click to make this the default behavior") } }