Files
DankMaterialShell/quickshell/Modals/KeybindsModalOverlay.qml
T
Huỳnh Thiện Lộc 9d1884fb19 feat(keybinds): redesign cheatsheet with category navigation (#3534)
* feat(keybinds): redesign cheatsheet with category navigation, M3 styling, and click-to-execute

- Add category sidebar with Material Symbols icons and badge counts
- Move search field to top of sidebar with Ctrl+F shortcut
- Implement 2-column masonry layout for keybind items
- Deduplicate duplicate actions and stack multi-key combos vertically
- Collapse consecutive workspace keybindings (1-9) into range entries
- Add media & hardware icons for volume, mic, brightness, and PrtSc keycaps
- Preserve Niri window filter properties and distinguish same-app Alt-Tab binds
- Enable click-to-execute for keybind actions across supported compositors

* fix(keybinds): preserve niri action properties and disable execution on range rows

* fix(keybinds): convert niri action properties to CLI flags and disable IPC execution for window switcher binds

* fix(keybinds): pass skip-confirmation as boolean switch in niri executeAction

* fix(keybinds): handle niri spawn-sh actions in executeAction
2026-09-23 09:09:28 -04:00

40 lines
1.1 KiB
QML

import QtQml
import QtQuick
import qs.Common
import qs.Modals
import qs.Modals.Common
import qs.Services
DankModal {
id: overlay
signal floatingToggleRequested
layerNamespace: "dms:keybinds"
useOverlayLayer: true
property real _maxW: Math.min(overlay.screenWidth * 0.92, 1200)
property real _maxH: Math.min(overlay.screenHeight * 0.92, 900)
modalWidth: _maxW
modalHeight: _maxH
onBackgroundClicked: close()
onOpened: {
Qt.callLater(() => {
modalFocusScope.forceActiveFocus();
if (contentLoader.item?.searchField)
contentLoader.item.searchField.forceActiveFocus();
});
if (!Object.keys(KeybindsService.cheatsheet).length && KeybindsService.cheatsheetAvailable)
KeybindsService.loadCheatsheet();
}
content: Component {
KeybindsContent {
anchors.fill: parent
showFloatingToggle: true
floating: false
onCloseRequested: overlay.close()
onFloatingToggleRequested: overlay.floatingToggleRequested()
}
}
}