1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

launcher v2: meta improvements

- Allow disabling each plugin from "all" mode
- add IPCs for toggling specific modes
- niri: overview respect size & default to apps mode
- fix unicode icon handling
This commit is contained in:
bbedward
2026-01-21 11:38:48 -05:00
parent eebb4827c4
commit 3922070488
11 changed files with 312 additions and 15 deletions

View File

@@ -53,7 +53,7 @@ Item {
signal dialogClosed
function _initializeAndShow(query) {
function _initializeAndShow(query, mode) {
contentVisible = true;
spotlightContent.searchField.forceActiveFocus();
@@ -61,7 +61,8 @@ Item {
spotlightContent.searchField.text = query;
}
if (spotlightContent.controller) {
spotlightContent.controller.searchMode = "all";
var targetMode = mode || "all";
spotlightContent.controller.searchMode = targetMode;
spotlightContent.controller.activePluginId = "";
spotlightContent.controller.activePluginName = "";
spotlightContent.controller.pluginFilter = "";
@@ -136,6 +137,32 @@ Item {
spotlightOpen ? hide() : show();
}
function showWithMode(mode) {
closeCleanupTimer.stop();
isClosing = false;
openedFromOverview = false;
var focusedScreen = CompositorService.getFocusedScreen();
if (focusedScreen)
launcherWindow.screen = focusedScreen;
spotlightOpen = true;
keyboardActive = true;
ModalManager.openModal(root);
if (useHyprlandFocusGrab)
focusGrab.active = true;
_initializeAndShow("", mode);
}
function toggleWithMode(mode) {
if (spotlightOpen) {
hide();
} else {
showWithMode(mode);
}
}
Timer {
id: closeCleanupTimer
interval: Theme.expressiveDurations.expressiveFastSpatial + 50