mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
17 lines
820 B
Lua
17 lines
820 B
Lua
-- Work around Hyprland send_shortcut sometimes leaving synthetic key state stuck/repeating.
|
|
-- https://github.com/hyprwm/Hyprland/discussions/14099
|
|
local function send_shortcut_once(mods, key)
|
|
return function()
|
|
hl.dispatch(hl.dsp.send_key_state({ mods = mods, key = key, state = "down", window = "activewindow" }))
|
|
|
|
hl.timer(function()
|
|
hl.dispatch(hl.dsp.send_key_state({ mods = mods, key = key, state = "up", window = "activewindow" }))
|
|
end, { timeout = 50, type = "oneshot" })
|
|
end
|
|
end
|
|
|
|
o.bind("SUPER + C", "Universal copy", send_shortcut_once("CTRL", "Insert"))
|
|
o.bind("SUPER + V", "Universal paste", send_shortcut_once("SHIFT", "Insert"))
|
|
o.bind("SUPER + X", "Universal cut", send_shortcut_once("CTRL", "X"))
|
|
o.bind("SUPER + CTRL + V", "Clipboard manager", { omarchy = "walker -m clipboard" })
|