From 75af444cee5fe18ca0686773e546b4a9ac7aa21f Mon Sep 17 00:00:00 2001 From: Lucas <43530291+LuckShiba@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:04:04 -0300 Subject: [PATCH] niri: add option to disable overview launcher (#887) --- quickshell/Common/SettingsData.qml | 1 + quickshell/Common/settings/SettingsSpec.js | 1 + quickshell/DMSShell.qml | 2 +- quickshell/Modules/Settings/LauncherTab.qml | 63 +++++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 34744953..ad20e1fe 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -187,6 +187,7 @@ Singleton { property bool sortAppsAlphabetically: false property int appLauncherGridColumns: 4 property bool spotlightCloseNiriOverview: true + property bool niriOverviewOverlayEnabled: true property string weatherLocation: "New York, NY" property string weatherCoordinates: "40.7128,-74.0060" diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index 0a87c988..8bef8302 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -100,6 +100,7 @@ var SPEC = { sortAppsAlphabetically: { def: false }, appLauncherGridColumns: { def: 4 }, spotlightCloseNiriOverview: { def: true }, + niriOverviewOverlayEnabled: { def: true }, weatherLocation: { def: "New York, NY" }, weatherCoordinates: { def: "40.7128,-74.0060" }, diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index e0fa098a..51dab583 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -712,7 +712,7 @@ Item { LazyLoader { id: niriOverviewOverlayLoader - active: CompositorService.isNiri + active: CompositorService.isNiri && SettingsData.niriOverviewOverlayEnabled component: NiriOverviewOverlay { id: niriOverviewOverlay } diff --git a/quickshell/Modules/Settings/LauncherTab.qml b/quickshell/Modules/Settings/LauncherTab.qml index 652fceb5..0daf0ee8 100644 --- a/quickshell/Modules/Settings/LauncherTab.qml +++ b/quickshell/Modules/Settings/LauncherTab.qml @@ -655,6 +655,69 @@ Item { } } + StyledRect { + width: parent.width + height: niriOverlayEnabledSection.implicitHeight + Theme.spacingL * 2 + radius: Theme.cornerRadius + color: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) + border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.2) + border.width: 0 + visible: CompositorService.isNiri + + Column { + id: niriOverlayEnabledSection + + anchors.fill: parent + anchors.margins: Theme.spacingL + spacing: Theme.spacingM + + Row { + width: parent.width + spacing: Theme.spacingM + + DankIcon { + name: "layers" + size: Theme.iconSize + color: Theme.primary + anchors.verticalCenter: parent.verticalCenter + } + + StyledText { + text: I18n.tr("Enable Overview Overlay") + font.pixelSize: Theme.fontSizeLarge + font.weight: Font.Medium + color: Theme.surfaceText + anchors.verticalCenter: parent.verticalCenter + } + + Item { + width: parent.width - parent.children[0].width - parent.children[1].width - niriOverlayToggle.width - Theme.spacingM * 3 + height: 1 + } + + DankToggle { + id: niriOverlayToggle + + width: 32 + height: 18 + checked: SettingsData.niriOverviewOverlayEnabled + anchors.verticalCenter: parent.verticalCenter + onToggled: checked => { + SettingsData.set("niriOverviewOverlayEnabled", checked); + } + } + } + + StyledText { + width: parent.width + text: I18n.tr("When enabled, shows the launcher overlay when typing in Niri overview mode. Disable this if you prefer to not have the launcher when typing on Niri overview or want to use other launcher in the overview.") + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceVariantText + wrapMode: Text.WordWrap + } + } + } + StyledRect { width: parent.width height: recentlyUsedSection.implicitHeight + Theme.spacingL * 2