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

niri: fix keybind handling of cooldown-ms parameter

This commit is contained in:
bbedward
2025-12-12 09:52:35 -05:00
parent d4be68912c
commit 24d9b77307
5 changed files with 93 additions and 5 deletions

View File

@@ -314,7 +314,8 @@ Singleton {
const keyData = {
key: bind.key || "",
source: bind.source || "config",
isOverride: bind.source === "dms"
isOverride: bind.source === "dms",
cooldownMs: bind.cooldownMs || 0
};
if (actionMap[action]) {
actionMap[action].keys.push(keyData);
@@ -378,6 +379,8 @@ Singleton {
const cmd = ["dms", "keybinds", "set", currentProvider, bindData.key, bindData.action, "--desc", bindData.desc || ""];
if (originalKey && originalKey !== bindData.key)
cmd.push("--replace-key", originalKey);
if (bindData.cooldownMs > 0)
cmd.push("--cooldown-ms", String(bindData.cooldownMs));
saveProcess.command = cmd;
saveProcess.running = true;
bindSaved(bindData.key);