Files
hypr/modules/binds.lua
T
2026-06-05 01:05:41 +02:00

64 lines
2.9 KiB
Lua

hl.bind("SUPER + mouse:272", hl.dsp.window.drag(), { mouse = true })
hl.bind("SUPER + mouse:273", hl.dsp.window.resize(), { mouse = true })
hl.bind("SUPER + S", hl.dsp.window.float())
hl.bind("SUPER + Q", hl.dsp.window.close())
hl.bind("SUPER + M", hl.dsp.exit())
hl.bind("SUPER + RETURN", hl.dsp.exec_cmd("ghostty"))
hl.bind("SUPER + E", hl.dsp.exec_cmd("dolphin"))
hl.bind("SUPER + B", hl.dsp.exec_cmd("firefox"))
hl.bind("SUPER + H", hl.dsp.focus({ direction = "l" }))
hl.bind("SUPER + L", hl.dsp.focus({ direction = "r" }))
hl.bind("SUPER + K", hl.dsp.focus({ direction = "u" }))
hl.bind("SUPER + J", hl.dsp.focus({ direction = "d" }))
hl.bind("SUPER + SHIFT + L", hl.dsp.window.resize({ x = 50, y = 0, relative = true }), { repeating = true })
hl.bind("SUPER + SHIFT + H", hl.dsp.window.resize({ x = -50, y = 0, relative = true }), { repeating = true })
hl.bind("SUPER + SHIFT + K", hl.dsp.window.resize({ x = 0, y = -50, relative = true }), { repeating = true })
hl.bind("SUPER + SHIFT + J", hl.dsp.window.resize({ x = 0, y = 50, relative = true }), { repeating = true })
for i = 1, 10 do
local key = i % 10 -- 10 maps to key 0
hl.bind("SUPER" .. " + " .. key, hl.dsp.focus({ workspace = i }))
hl.bind("ALT" .. " + " .. key, hl.dsp.window.move({ workspace = i, follow = true }))
-- hl.bind("SUPER" .. " + " .. key, hl.dsp.window.move({ workspace = i, follow = false }))
end
hl.bind("SUPER + F", hl.dsp.window.fullscreen())
hl.bind("SUPER + D", hl.dsp.exec_cmd("fuzzel"))
hl.bind(
"XF86AudioRaiseVolume",
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"),
{ repeating = true, locked = true }
)
hl.bind(
"XF86AudioLowerVolume",
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
{ repeating = true, locked = true }
)
hl.bind(
"XF86AudioMute",
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
{ repeating = true, locked = true }
)
hl.bind(
"XF86AudioMicMute",
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"),
{ repeating = true, locked = true }
)
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set +5%"), { locked = true, repeating = true })
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set -5%"), { locked = true, repeating = true })
hl.bind("XF86WebCam", hl.dsp.exec_cmd(""), { locked = true, repeating = true })
hl.bind("PRINT", hl.dsp.global("zshell:screenshotFreeze"))
hl.bind("SUPER + R", hl.dsp.global("zshell:toggle-launcher"))
hl.bind("SUPER + A", hl.dsp.global("zshell:toggle-nc"))
hl.bind("SUPER + V", hl.dsp.global("zshell:toggle-drawing"))
hl.bind("SUPER + F1", hl.dsp.global("zshell:lock"))
hl.bind("SUPER + F2", hl.dsp.global("zshell:toggle-settings"))