--################## --## KEYBINDINGS ### --################## -- See https://wiki.hypr.land/Configuring/Keywords/ local mainMod = "SUPER" local terminal = "kitty" local fileManager = "dolphin" local menu = "rofi -show run" local programs = "rofi -show drun" -- Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) hl.bind(mainMod .. " + SHIFT + C", hl.dsp.window.close()) hl.bind(mainMod .. " + ALT + SHIFT + L", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit")) hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) hl.bind(mainMod .. " + M", hl.dsp.window.fullscreen(1)) hl.bind(mainMod .. " + SHIFT + M", hl.dsp.window.float({ action = "toggle" })) hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu)) hl.bind(mainMod .. " + P", hl.dsp.exec_cmd(programs)) hl.bind(mainMod .. " + L", hl.dsp.layout("togglesplit")) hl.bind(mainMod .. " + code:47", hl.dsp.exec_cmd("rofi -show emoji")) hl.bind(mainMod .. " + TAB", hl.dsp.exec_cmd("qs ipc -c overview call overview toggle")) -- Move focus with mainMod + arrow keys hl.bind(mainMod .. " + J", hl.dsp.window.cycle_next("")) hl.bind(mainMod .. " + K", hl.dsp.window.cycle_next("prev")) -- bind = $mainMod, o, movefocus, u hl.bind(mainMod .. " + SHIFT + o", hl.dsp.focus({ direction = "down" })) hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.swap( {direction = "left"})) hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.swap( {direction = "right"})) hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen("toggle")) -- Switch workspaces with mainMod + [0-9] hl.bind(mainMod .. " + 1", hl.dsp.focus({ workspace = 1 })) hl.bind(mainMod .. " + 2", hl.dsp.focus({ workspace = 2 })) hl.bind(mainMod .. " + 3", hl.dsp.focus({ workspace = 3 })) hl.bind(mainMod .. " + 4", hl.dsp.focus({ workspace = 4 })) hl.bind(mainMod .. " + 5", hl.dsp.focus({ workspace = 5 })) hl.bind(mainMod .. " + 6", hl.dsp.focus({ workspace = 6 })) hl.bind(mainMod .. " + 7", hl.dsp.focus({ workspace = 7 })) hl.bind(mainMod .. " + 8", hl.dsp.focus({ workspace = 8 })) hl.bind(mainMod .. " + 9", hl.dsp.focus({ workspace = 9 })) hl.bind(mainMod .. " + 0", hl.dsp.focus({ workspace = 10 })) -- Move active window to a workspace with mainMod + SHIFT + [0-9] hl.bind(mainMod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 })) hl.bind(mainMod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 })) hl.bind(mainMod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 })) hl.bind(mainMod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 })) hl.bind(mainMod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 })) hl.bind(mainMod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 })) hl.bind(mainMod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 })) hl.bind(mainMod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 })) hl.bind(mainMod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 })) hl.bind(mainMod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 })) hl.bind(mainMod .. " + left", hl.dsp.focus({ workspace = -1 })) hl.bind(mainMod .. " + right", hl.dsp.focus({ workspace = "+1" })) hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.move({ workspace = -1 })) hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.move({ workspace = "+1" })) -- Example special workspace (scratchpad) -- bind = $mainMod, S, togglespecialworkspace, magic -- bind = $mainMod SHIFT, S, movetoworkspace, special:magic -- Scroll through existing workspaces with mainMod + scroll hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" })) hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" })) -- Move/resize windows with mainMod + LMB/RMB and dragging hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag()) hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize()) -- Laptop multimedia keys for volume and LCD brightness hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true }) hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true }) hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true }) -- Requires playerctl hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { 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 }) -- applications hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("grimblast copysave area"))