Files
2026-05-23 17:12:20 +02:00

54 lines
2.4 KiB
Lua

-- This file will not be overwritten across dots-hyprland updates.
-- The file name is for the sake of organization and does not matter
-- See the corresponding files in ~/.config/hypr/hyprland for examples
hl.unbind("Super + Slash")
hl.bind("SUPER + Space", hl.dsp.global("quickshell:cheatsheetToggle"), { description = "Shell: Toggle cheatsheet" })
hl.unbind("Super + mouse:272")
hl.unbind("Super + mouse:273")
hl.unbind("Super + mouse:274")
hl.bind("ALT + mouse:272", hl.dsp.window.drag(), { mouse = true, description = "Window: Move" })
hl.bind("ALT + mouse:273", hl.dsp.window.resize(), { mouse = true, description = "Window: Resize" })
hl.bind("ALT + mouse:274", hl.dsp.window.drag(), { mouse = true })
for i = 1, 4 do
local arrowkey = { "Left", "Right", "Up", "Down" }
local focusdir = { "l", "r", "u", "d" }
hl.unbind("SUPER + " .. arrowkey[i])
hl.unbind("SUPER + SHIFT + " .. arrowkey[i])
hl.bind("SUPER + SHIFT + " .. arrowkey[i], hl.dsp.focus({ direction = focusdir[i] }),
{ description = "Window: Focus " .. arrowkey[i] })
hl.bind("SUPER + " .. arrowkey[i], hl.dsp.window.move({ direction = focusdir[i] }),
{ description = "Window: Move " .. arrowkey[i] })
end
hl.unbind("Super + Q")
hl.unbind("ALT + F4")
hl.bind("ALT + F4", hl.dsp.window.close(), { description = "Window: Close" })
for i = 1, 10 do
hl.unbind("SUPER + ALT + code:" .. i + 9)
hl.unbind("SUPER + ALT + code:" .. i + 86)
hl.bind("SUPER + code:" .. i + 9, function()
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = false }))
end)
hl.bind("SUPER + code:" .. i + 86, function()
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = false }))
end)
end
for i = 1, 2 do
local keydirs = { "Up", "Down" }
local prefix = { "r-", "r+" }
local descdir = { "left", "right" }
hl.unbind("SUPER + SHIFT + Page_" .. keydirs[i])
hl.bind("SUPER + Page_" .. keydirs[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" }), {description = "Window: Send to workspace " .. descdir[i]})
end
hl.unbind("Super + W")
hl.unbind("Super + C")
hl.unbind("Super + X")
hl.bind("SUPER + X", hl.dsp.exec_cmd(codeEditor), { description = "App: Code editor" })
hl.bind("SUPER + C", hl.dsp.exec_cmd(codeEditor), { description = "App: Code editor" })
hl.bind("SUPER + W", hl.dsp.exec_cmd(browser), { description = "App: Browser" })