1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 08:22:51 -05:00

keybinds: add niri provider

This commit is contained in:
bbedward
2025-11-30 19:25:48 -05:00
parent 17639e8729
commit 35e0dc84e8
14 changed files with 1271 additions and 102 deletions

View File

@@ -84,19 +84,21 @@ func (m *MangoWCProvider) categorizeByCommand(command string) string {
func (m *MangoWCProvider) convertKeybind(kb *MangoWCKeyBinding) keybinds.Keybind {
key := m.formatKey(kb)
rawAction := m.formatRawAction(kb.Command, kb.Params)
desc := kb.Comment
if desc == "" {
desc = m.generateDescription(kb.Command, kb.Params)
desc = rawAction
}
return keybinds.Keybind{
Key: key,
Description: desc,
Action: rawAction,
}
}
func (m *MangoWCProvider) generateDescription(command, params string) string {
func (m *MangoWCProvider) formatRawAction(command, params string) string {
if params != "" {
return command + " " + params
}