-- config/keybinds.lua -- All keybinds, translated from keybinds.conf to the 0.55 Lua API. -- Modifier shorthand used: "SUPER" = $mainMod. local S = "SUPER" -- ── Applications ───────────────────────────────────────────── hl.bind(S .. " + RETURN", hl.dsp.exec_cmd(terminal)) hl.bind(S .. " + E", hl.dsp.exec_cmd(filemanager)) hl.bind(S .. " + Q", hl.dsp.window.close()) hl.bind(S .. " + SHIFT + M", hl.dsp.exec_cmd('loginctl terminate-user ""')) hl.bind(S .. " + V", hl.dsp.window.float({ action = "toggle" })) hl.bind(S .. " + SPACE", hl.dsp.exec_cmd(applauncher)) hl.bind(S .. " + F", hl.dsp.window.fullscreen()) hl.bind(S .. " + Y", hl.dsp.window.pin()) hl.bind(S .. " + J", hl.dsp.layout("togglesplit")) -- dwindle only -- ── Groups ─────────────────────────────────────────────────── hl.bind(S .. " + K", hl.dsp.group.toggle()) -- hl.bind(S .. " + Tab", hl.dsp.group.next( window )) hl.bind(S .. " + Tab", function() local w = hl.get_active_window() if w and w.group then hl.dispatch(hl.dsp.group.next()) else hl.dispatch(hl.dsp.exec_cmd("qs ipc -c own call overview toggle")) end end) -- ── Volume ─────────────────────────────────────────────────── local vol = "~/.config/hypr/scripts/volume-helper.sh" hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd(vol .. " up"), { repeating = true }) hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd(vol .. " down"), { repeating = true }) hl.bind("XF86AudioMute", hl.dsp.exec_cmd(vol .. " toggle"), { repeating = true }) -- ── Playback ───────────────────────────────────────────────── hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause")) hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next")) hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous")) -- ── Brightness ─────────────────────────────────────────────── hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl s +5%"), { repeating = true }) hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl s 5%-"), { repeating = true }) -- ── Utilities ──────────────────────────────────────────────── hl.bind(S .. " + SHIFT + P", hl.dsp.exec_cmd("gnome-calculator")) hl.bind(S .. " + L", hl.dsp.exec_cmd("~/.config/swaylock/lockscript.sh")) hl.bind(S .. " + P", hl.dsp.exec_cmd("hyprpicker -a")) hl.bind(S .. " + C", hl.dsp.exec_cmd("vicinae vicinae://extensions/vicinae/clipboard/history")) -- ── Screenshots ────────────────────────────────────────────── hl.bind(S .. " + PRINT", hl.dsp.exec_cmd("hyprshot -m window")) hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m output")) hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m region")) hl.bind(S .. " + S", hl.dsp.exec_cmd('~/.config/hypr/scripts/record-or-screenshot.sh -d "' .. dmenu .. '"')) -- ── Window focus ───────────────────────────────────────────── hl.bind(S .. " + left", hl.dsp.focus({ direction = "l" })) hl.bind(S .. " + right", hl.dsp.focus({ direction = "r" })) hl.bind(S .. " + up", hl.dsp.focus({ direction = "u" })) hl.bind(S .. " + down", hl.dsp.focus({ direction = "d" })) -- ── Window move ────────────────────────────────────────────── hl.bind(S .. " + SHIFT + left", hl.dsp.window.move({ direction = "l" })) hl.bind(S .. " + SHIFT + right", hl.dsp.window.move({ direction = "r" })) hl.bind(S .. " + SHIFT + up", hl.dsp.window.move({ direction = "u" })) hl.bind(S .. " + SHIFT + down", hl.dsp.window.move({ direction = "d" })) -- Mouse drag / resize hl.bind(S .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) hl.bind(S .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) -- ── Workspace Move ─────────────────────────────────────────── hl.bind(S .. " + SHIFT + TAB", hl.dsp.workspace.move({ monitor = "+1" })) -- ── Resize submap ──────────────────────────────────────────── hl.bind(S .. " + SHIFT + R", hl.dsp.submap("resize")) hl.define_submap("resize", function() -- Set repeating binds for resizing the active window. hl.bind("right", hl.dsp.window.resize({ x = 10, y = 0, relative = true }), { repeating = true }) hl.bind("left", hl.dsp.window.resize({ x = -10, y = 0, relative = true }), { repeating = true }) hl.bind("up", hl.dsp.window.resize({ x = 0, y = 10, relative = true }), { repeating = true }) hl.bind("down", hl.dsp.window.resize({ x = 0, y = -10, relative = true }), { repeating = true }) -- Use `reset` to go back to the global submap hl.bind("escape", hl.dsp.submap("reset")) end) -- ── Workspace switching ─────────────────────────────────────── for i = 1, 10 do local key = tostring(i % 10) local ws = tostring(i) hl.bind(S .. " + " .. key, hl.dsp.focus({ workspace = ws })) hl.bind(S .. " + CTRL + " .. key, hl.dsp.window.move({ workspace = ws, follow = true })) end hl.bind(S .. " + PERIOD", hl.dsp.focus({ workspace = "e+1" })) hl.bind(S .. " + COMMA", hl.dsp.focus({ workspace = "e-1" })) hl.bind(S .. " + ALT_L + right", hl.dsp.focus({ workspace = "e+1" })) hl.bind(S .. " + ALT_L + left", hl.dsp.focus({ workspace = "e-1" })) hl.bind(S .. " + CTRL + right", hl.dsp.window.move({ workspace = "+1", follow = true })) hl.bind(S .. " + CTRL + left", hl.dsp.window.move({ workspace = "-1", follow = true })) hl.bind(S .. " + slash", hl.dsp.focus({ workspace = "previous" })) hl.bind(S .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { mouse = true }) hl.bind(S .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { mouse = true }) -- Special / scratchpad hl.bind(S .. " + minus", hl.dsp.window.move({ workspace = "special" })) hl.bind(S .. " + equal", hl.dsp.workspace.toggle_special()) hl.bind(S .. " + F1", hl.dsp.workspace.toggle_special({ name = "scratchpad" })) hl.bind(S .. " + SHIFT + ALT_L + F1", hl.dsp.window.move({ workspace = "special:scratchpad", follow = false })) -- Quickshell overview -- hl.bind(S .. " + TAB", hl.dsp.exec_cmd("qs ipc -c overview call overview toggle")) -- ── Monitors ───────────────────────────────────────────────── -- hl.bind(S .. " + F8", function() monitors.solo() end) -- hl.bind(S .. " + F9", function() monitors.dual() end) -- hl.bind(S .. " + F10", function() monitors.triple() end) -- QuickShell hl.bind(S .. " + W", hl.dsp.exec_cmd("echo 1 > /tmp/qs-wallpaper-ipc"))