From 2ddb14a95f84fa686797f07cba3d3750c205f94c Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Tue, 2 Sep 2025 00:04:17 +0800 Subject: [PATCH] Added a toggle for Noctalia-shell wallpaper management --- Commons/Settings.qml | 1 + Modules/Background/Background.qml | 2 +- Modules/Background/Overview.qml | 2 +- Modules/SettingsPanel/Tabs/WallpaperTab.qml | 8 ++++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Commons/Settings.qml b/Commons/Settings.qml index f0ccc1b..e75d578 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -164,6 +164,7 @@ Singleton { // wallpaper property JsonObject wallpaper: JsonObject { + property bool enabled: true property string directory: "/usr/share/wallpapers" property bool enableMultiMonitorDirectories: false property bool setWallpaperOnAllMonitors: true diff --git a/Modules/Background/Background.qml b/Modules/Background/Background.qml index 0acde3b..594425f 100644 --- a/Modules/Background/Background.qml +++ b/Modules/Background/Background.qml @@ -12,7 +12,7 @@ Variants { required property ShellScreen modelData - active: Settings.isLoaded && modelData + active: Settings.isLoaded && modelData && Settings.data.wallpaper.enabled sourceComponent: PanelWindow { id: root diff --git a/Modules/Background/Overview.qml b/Modules/Background/Overview.qml index 16a2cd4..fac841e 100644 --- a/Modules/Background/Overview.qml +++ b/Modules/Background/Overview.qml @@ -12,7 +12,7 @@ Variants { delegate: Loader { required property ShellScreen modelData - active: Settings.isLoaded && CompositorService.isNiri && modelData + active: Settings.isLoaded && CompositorService.isNiri && modelData && Settings.data.wallpaper.enabled property string wallpaper: "" diff --git a/Modules/SettingsPanel/Tabs/WallpaperTab.qml b/Modules/SettingsPanel/Tabs/WallpaperTab.qml index 8212b4a..6696e8d 100644 --- a/Modules/SettingsPanel/Tabs/WallpaperTab.qml +++ b/Modules/SettingsPanel/Tabs/WallpaperTab.qml @@ -10,7 +10,15 @@ import qs.Widgets ColumnLayout { id: root + NToggle { + label: "Enable Wallpaper Management" + description: "Let Quickshell manage your wallpaper. Disable this if you use an external wallpaper daemon like swww." + checked: Settings.data.wallpaper.enabled + onToggled: checked => Settings.data.wallpaper.enabled = checked + } + ColumnLayout { + enabled: Settings.data.wallpaper.enabled spacing: Style.marginL * scaling Layout.fillWidth: true NTextInput {