1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 22:48:28 -04:00

fix(keybinds): respect niri mod-key when capturing binds

Hardens #2224
This commit is contained in:
purian23
2026-07-04 00:50:58 -04:00
parent c554d973ef
commit b34941e3b8
8 changed files with 85 additions and 10 deletions
@@ -17,7 +17,10 @@ func TestNiriProviderGetCheatSheet(t *testing.T) {
tmpDir := t.TempDir()
configFile := filepath.Join(tmpDir, "config.kdl")
content := `binds {
content := `input {
mod-key "Alt"
}
binds {
Mod+Q { close-window; }
Mod+F { fullscreen-window; }
Mod+T hotkey-overlay-title="Open Terminal" { spawn "kitty"; }
@@ -45,6 +48,10 @@ func TestNiriProviderGetCheatSheet(t *testing.T) {
t.Errorf("Provider = %q, want %q", cheatSheet.Provider, "niri")
}
if cheatSheet.ModKey != "Alt" {
t.Errorf("ModKey = %q, want %q", cheatSheet.ModKey, "Alt")
}
windowBinds := cheatSheet.Binds["Window"]
if len(windowBinds) < 2 {
t.Errorf("Expected at least 2 Window binds, got %d", len(windowBinds))