diff --git a/core/internal/config/embedded/hypr-binds.lua b/core/internal/config/embedded/hypr-binds.lua index 6b16c06e..37f7ee97 100644 --- a/core/internal/config/embedded/hypr-binds.lua +++ b/core/internal/config/embedded/hypr-binds.lua @@ -3,6 +3,7 @@ -- === Application Launchers === hl.bind("SUPER + T", hl.dsp.exec_cmd("{{TERMINAL_COMMAND}}")) hl.bind("SUPER + space", hl.dsp.exec_cmd("dms ipc call spotlight toggle")) +hl.bind("ALT + space", hl.dsp.exec_cmd("dms ipc call spotlight-bar toggle")) hl.bind("SUPER + V", hl.dsp.exec_cmd("dms ipc call clipboard toggle")) hl.bind("SUPER + M", hl.dsp.exec_cmd("dms ipc call processlist focusOrToggle")) hl.bind("SUPER + comma", hl.dsp.exec_cmd("dms ipc call settings focusOrToggle")) diff --git a/core/internal/config/embedded/niri-binds.kdl b/core/internal/config/embedded/niri-binds.kdl index 5b6d5286..a08f5801 100644 --- a/core/internal/config/embedded/niri-binds.kdl +++ b/core/internal/config/embedded/niri-binds.kdl @@ -9,6 +9,9 @@ binds { Mod+Space hotkey-overlay-title="Application Launcher" { spawn "dms" "ipc" "call" "spotlight" "toggle"; } + Alt+Space hotkey-overlay-title="Spotlight Bar" { + spawn "dms" "ipc" "call" "spotlight-bar" "toggle"; + } Mod+V hotkey-overlay-title="Clipboard Manager" { spawn "dms" "ipc" "call" "clipboard" "toggle"; } diff --git a/quickshell/Common/KeybindActions.js b/quickshell/Common/KeybindActions.js index 6dc984d8..e41be355 100644 --- a/quickshell/Common/KeybindActions.js +++ b/quickshell/Common/KeybindActions.js @@ -11,6 +11,9 @@ const DMS_ACTIONS = [ { id: "spawn dms ipc call spotlight toggle", label: "App Launcher: Toggle" }, { id: "spawn dms ipc call spotlight open", label: "App Launcher: Open" }, { id: "spawn dms ipc call spotlight close", label: "App Launcher: Close" }, + { id: "spawn dms ipc call spotlight-bar toggle", label: "Spotlight Bar: Toggle" }, + { id: "spawn dms ipc call spotlight-bar open", label: "Spotlight Bar: Open" }, + { id: "spawn dms ipc call spotlight-bar close", label: "Spotlight Bar: Close" }, { id: "spawn dms ipc call clipboard toggle", label: "Clipboard: Toggle" }, { id: "spawn dms ipc call clipboard open", label: "Clipboard: Open" }, { id: "spawn dms ipc call clipboard close", label: "Clipboard: Close" }, diff --git a/quickshell/Common/SettingsData.qml b/quickshell/Common/SettingsData.qml index 64b2ab9b..95c82791 100644 --- a/quickshell/Common/SettingsData.qml +++ b/quickshell/Common/SettingsData.qml @@ -258,8 +258,6 @@ Singleton { onFrameLauncherEmergeSideChanged: saveSettings() property bool frameLauncherArcExtender: false onFrameLauncherArcExtenderChanged: saveSettings() - property bool frameUseSpotlightLauncher: false - onFrameUseSpotlightLauncherChanged: saveSettings() readonly property string frameModalEmergeSide: frameLauncherEmergeSide === "top" ? "bottom" : "top" property string frameMode: "connected" onFrameModeChanged: saveSettings() diff --git a/quickshell/Common/settings/SettingsSpec.js b/quickshell/Common/settings/SettingsSpec.js index 51c7d67f..e61d65b1 100644 --- a/quickshell/Common/settings/SettingsSpec.js +++ b/quickshell/Common/settings/SettingsSpec.js @@ -575,7 +575,6 @@ var SPEC = { frameCloseGaps: { def: true }, frameLauncherEmergeSide: { def: "bottom" }, frameLauncherArcExtender: { def: false }, - frameUseSpotlightLauncher: { def: false }, frameMode: { def: "connected" } }; diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index eb586ae0..94b6cc71 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -725,6 +725,25 @@ Item { } } + LazyLoader { + id: spotlightBarModalLoader + + active: false + + Component.onCompleted: { + PopoutService.spotlightBarModalLoader = spotlightBarModalLoader; + } + + DankLauncherV2ModalSpotlight { + id: spotlightBarModal + + Component.onCompleted: { + PopoutService.spotlightBarModal = spotlightBarModal; + PopoutService._onSpotlightBarModalLoaded(); + } + } + } + LazyLoader { id: clipboardHistoryPopoutLoader diff --git a/quickshell/DMSShellIPC.qml b/quickshell/DMSShellIPC.qml index ac8a259a..53a69d32 100644 --- a/quickshell/DMSShellIPC.qml +++ b/quickshell/DMSShellIPC.qml @@ -1340,6 +1340,25 @@ Item { target: "spotlight" } + IpcHandler { + function open(): string { + PopoutService.openSpotlightBar(); + return "SPOTLIGHT_BAR_OPEN_SUCCESS"; + } + + function close(): string { + PopoutService.closeSpotlightBar(); + return "SPOTLIGHT_BAR_CLOSE_SUCCESS"; + } + + function toggle(): string { + PopoutService.toggleSpotlightBar(); + return "SPOTLIGHT_BAR_TOGGLE_SUCCESS"; + } + + target: "spotlight-bar" + } + IpcHandler { function info(message: string): string { if (!message) diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml index 257157ca..890f6a00 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml @@ -62,7 +62,7 @@ Item { impl.item.toggleWithMode(mode); } - readonly property bool useSpotlightBackend: SettingsData.connectedFrameModeActive ? SettingsData.frameUseSpotlightLauncher : SettingsData.launcherStyle === "spotlight" + readonly property bool useSpotlightBackend: !SettingsData.connectedFrameModeActive && SettingsData.launcherStyle === "spotlight" readonly property var _desiredBackend: useSpotlightBackend ? spotlightComp : (SettingsData.connectedFrameModeActive ? connectedComp : standaloneComp) property var _resolvedBackend: null @@ -73,9 +73,6 @@ Item { function onConnectedFrameModeActiveChanged() { root._maybeResolveBackend(); } - function onFrameUseSpotlightLauncherChanged() { - root._maybeResolveBackend(); - } function onLauncherStyleChanged() { root._maybeResolveBackend(); } diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalSpotlight.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalSpotlight.qml index 579bbd01..07c730d4 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalSpotlight.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2ModalSpotlight.qml @@ -75,7 +75,7 @@ Item { const searchBarH = 56; const usableH = Math.max(searchBarH, screenHeight - insetT - insetB); const preferred = insetT + Math.max(0, usableH * 0.33 - searchBarH / 2); - const maxY = Math.max(insetT, screenHeight - insetB - _contentImplicitH); + const maxY = Math.max(insetT, screenHeight - insetB - 56); return Math.max(insetT, Math.min(preferred, maxY)); } diff --git a/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml b/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml index 6261384b..cc8d7905 100644 --- a/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml +++ b/quickshell/Modals/DankLauncherV2/SpotlightLauncherContent.qml @@ -15,8 +15,7 @@ FocusScope { readonly property bool _hasQuery: searchInput.text.length > 0 readonly property real _searchBarH: 56 - readonly property real _surfaceInset: BlurService.enabled ? (_hasQuery ? Theme.spacingS : Theme.spacingXS) : 0 - readonly property real _searchAreaH: _searchBarH + _surfaceInset * 2 + readonly property real _searchAreaH: _searchBarH readonly property real _statusH: 92 readonly property real _rowH: 64 readonly property real _maxResultsH: Math.min(430, (parentModal?.screenHeight ?? 900) * 0.55) @@ -233,11 +232,8 @@ FocusScope { Rectangle { id: searchBarSurface anchors.fill: parent - anchors.margins: root._surfaceInset - radius: height / 2 + radius: Theme.cornerRadius color: Theme.withAlpha(root._hasQuery ? Theme.surfaceContainerHigh : Theme.surfaceContainer, root._hasQuery ? Theme.popupTransparency : Math.max(0.68, Theme.popupTransparency * 0.9)) - border.color: BlurService.enabled && !root._hasQuery ? Theme.withAlpha(Theme.outline, 0.08) : "transparent" - border.width: BlurService.enabled && !root._hasQuery ? 1 : 0 Behavior on color { ColorAnimation { @@ -384,8 +380,6 @@ FocusScope { anchors.top: searchBarItem.bottom anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: root._surfaceInset - anchors.rightMargin: root._surfaceInset height: 1 color: Theme.outlineMedium opacity: root._resultsH > 0 ? 0.55 : 0 diff --git a/quickshell/Modules/Settings/FrameTab.qml b/quickshell/Modules/Settings/FrameTab.qml index a069f4a5..448499f0 100644 --- a/quickshell/Modules/Settings/FrameTab.qml +++ b/quickshell/Modules/Settings/FrameTab.qml @@ -308,15 +308,6 @@ Item { onToggled: checked => SettingsData.set("frameCloseGaps", !checked) } - SettingsToggleRow { - settingKey: "frameUseSpotlightLauncher" - tags: ["frame", "connected", "launcher", "spotlight", "search", "minimal"] - text: I18n.tr("Use Spotlight Launcher") - description: I18n.tr("Use the centered minimal launcher instead of the connected V2 launcher") - checked: SettingsData.frameUseSpotlightLauncher - onToggled: checked => SettingsData.set("frameUseSpotlightLauncher", checked) - } - SettingsButtonGroupRow { settingKey: "frameLauncherEmergeSide" tags: ["frame", "connected", "launcher", "modal", "emerge", "direction", "bottom", "top"] diff --git a/quickshell/Services/PopoutService.qml b/quickshell/Services/PopoutService.qml index 73fd6dd8..c9505269 100644 --- a/quickshell/Services/PopoutService.qml +++ b/quickshell/Services/PopoutService.qml @@ -34,6 +34,8 @@ Singleton { property var clipboardHistoryModal: null property var dankLauncherV2Modal: null property var dankLauncherV2ModalLoader: null + property var spotlightBarModal: null + property var spotlightBarModalLoader: null property var powerMenuModal: null property var processListModal: null property var processListModalLoader: null @@ -616,6 +618,45 @@ Singleton { } } + property bool _spotlightBarWantsOpen: false + property bool _spotlightBarWantsToggle: false + + function openSpotlightBar() { + if (spotlightBarModal) { + spotlightBarModal.show(); + } else if (spotlightBarModalLoader) { + _spotlightBarWantsOpen = true; + _spotlightBarWantsToggle = false; + spotlightBarModalLoader.active = true; + } + } + + function closeSpotlightBar() { + spotlightBarModal?.hide(); + } + + function toggleSpotlightBar() { + if (spotlightBarModal) { + spotlightBarModal.toggle(); + } else if (spotlightBarModalLoader) { + _spotlightBarWantsToggle = true; + _spotlightBarWantsOpen = false; + spotlightBarModalLoader.active = true; + } + } + + function _onSpotlightBarModalLoaded() { + if (_spotlightBarWantsOpen) { + _spotlightBarWantsOpen = false; + spotlightBarModal?.show(); + return; + } + if (_spotlightBarWantsToggle) { + _spotlightBarWantsToggle = false; + spotlightBarModal?.toggle(); + } + } + function openPowerMenu() { powerMenuModal?.openCentered(); }