diff options
| author | alex <[email protected]> | 2026-10-17 13:57:21 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-10-17 13:57:21 +0200 |
| commit | e9d4853a5aa29dfee07c4e23780f2ffc429be1a4 (patch) | |
| tree | 44eab16084113fa83e0039bf2df45d7e58d3f21f /home-manager/hypr/config/keybinds.lua | |
| parent | d6a4711c17e4b267f61023f4440eaa41728b345c (diff) | |
| download | nixos-e9d4853a5aa29dfee07c4e23780f2ffc429be1a4.tar.xz nixos-e9d4853a5aa29dfee07c4e23780f2ffc429be1a4.zip | |
added hyprland dotfiles to homemanager
Diffstat (limited to 'home-manager/hypr/config/keybinds.lua')
| -rw-r--r-- | home-manager/hypr/config/keybinds.lua | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/home-manager/hypr/config/keybinds.lua b/home-manager/hypr/config/keybinds.lua new file mode 100644 index 0000000..df5d89c --- /dev/null +++ b/home-manager/hypr/config/keybinds.lua @@ -0,0 +1,67 @@ +local mainMod = _G.mainMod or "SUPER" +local terminal = _G.terminal or "kitty" +local browser = _G.broser or "helium" +local files = _G.files or "thunar" +hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" }) +hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +hl.bind(mainMod .. " + SHIFT + Left", hl.dsp.window.resize({ x = -50, y = 0, relative = true }), { repeating = true }) +hl.bind(mainMod .. " + SHIFT + Right", hl.dsp.window.resize({ x = 50, y = 0, relative = true }), { repeating = true }) +hl.bind(mainMod .. " + SHIFT + Up", hl.dsp.window.resize({ x = 0, y = -50, relative = true }), { repeating = true }) +hl.bind(mainMod .. " + SHIFT + Down", hl.dsp.window.resize({ x = 0, y = 50, relative = true }), { repeating = true }) + +hl.bind(mainMod .. " + CTRL + Left", hl.dsp.window.move({ direction = "l" })) +hl.bind(mainMod .. " + CTRL + Right", hl.dsp.window.move({ direction = "r" })) +hl.bind(mainMod .. " + CTRL + Up", hl.dsp.window.move({ direction = "u" })) +hl.bind(mainMod .. " + CTRL + Down", hl.dsp.window.move({ direction = "d" })) + +hl.bind(mainMod .. " + Left", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod .. " + Right", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod .. " + Up", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod .. " + Down", hl.dsp.focus({ direction = "down" })) + +hl.bind(mainMod .. " + W", hl.dsp.window.close()) +hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.float({ action = "toggle" })) + +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("serpantinum brightness lower"), { locked = true }) +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("serpantinum brightness raise"), { locked = true }) + +hl.bind("Print", hl.dsp.exec_cmd("serpantinum screenshot"), { locked = true }) +hl.bind("SHIFT + Print", hl.dsp.exec_cmd("serpantinum screenshot --edit"), { locked = true }) +hl.bind("SUPER + Print", hl.dsp.exec_cmd("serpantinum screenshot --full"), { locked = true }) +hl.bind("SUPER + SHIFT + Print", hl.dsp.exec_cmd("serpantinum screenshot --full --edit"), { locked = true }) + +hl.bind("XF86PowerOff", hl.dsp.exec_cmd("serpantinum lock"), { locked = true }) +hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("serpantinum lock"), { repeating = true, locked = true }) + +hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { 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("XF86AudioMicMute", hl.dsp.exec_cmd("serpantinum volume mic-toggle"), { locked = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("serpantinum volume mute-toggle"), { locked = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("serpantinum volume lower"), { repeating = true, locked = true }) +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("serpantinum volume raise"), { repeating = true, locked = true }) + +hl.bind(mainMod .. " + B", hl.dsp.exec_cmd(browser)) +hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(files)) +hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal)) + +hl.bind(mainMod .. " + R", hl.dsp.exec_cmd("serpantinum reload")) +hl.bind(mainMod .. " + C", hl.dsp.exec_cmd("serpantinum msg toggle clipboard")) +hl.bind("ALT + SPACE", hl.dsp.exec_cmd("serpantinum msg toggle launcher")) +hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("serpantinum msg toggle music")) +hl.bind(mainMod .. " + N", hl.dsp.exec_cmd("serpantinum msg toggle system")) +hl.bind(mainMod .. " + S", hl.dsp.exec_cmd("serpantinum msg toggle calendar")) +hl.bind(mainMod .. " + V", hl.dsp.exec_cmd("serpantinum msg toggle volume")) +hl.bind(mainMod .. " + H", hl.dsp.exec_cmd("serpantinum msg toggle guide")) +hl.bind(mainMod .. " + A", hl.dsp.exec_cmd("serpantinum msg toggle autohide")) + +for i = 1, 10 do + local ws = tostring(i) + local key = tostring(i % 10) + hl.bind(mainMod .. " + " .. key, hl.dsp.exec_cmd("serpantinum msg workspace " .. ws)) + hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.exec_cmd("serpantinum msg workspace " .. ws .. " move")) +end |
