From 307163b56732906525b897f685e9f93b3b6980d7 Mon Sep 17 00:00:00 2001 From: Trey Blancher Date: Sun, 28 Jun 2026 09:45:56 -0400 Subject: [PATCH] Remapped keybinds to match Windows 11 defaults --- hyprland.lua | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/hyprland.lua b/hyprland.lua index e05f7d9..1f9cab1 100644 --- a/hyprland.lua +++ b/hyprland.lua @@ -199,30 +199,56 @@ end) -- App launchers using our custom Lua focusOrLaunch function bind("SUPER + return", function() fn.focusOrLaunch("alacritty", "Alacritty") end) -bind("SUPER + A", function() fn.focusOrLaunch("slack", "Slack", "Slack") end) -bind("SUPER + D", function() fn.focusOrLaunch("gnome-dictionary", "org.gnome.Dictionary", "org.gnome.Dictionary") end) +bind("SUPER + SHIFT + A", function() fn.focusOrLaunch("slack", "Slack", "Slack") end) +bind("SUPER + SHIFT + D", function() fn.focusOrLaunch("gnome-dictionary", "org.gnome.Dictionary", "org.gnome.Dictionary") end) bind("SUPER + G", function() fn.focusOrLaunch("vivaldi-stable", "vivaldi-stable", "vivaldi-stable") end) bind("SUPER + ALT + H", function() fn.focusOrLaunch("qutebrowser", "org.qutebrowser.qutebrowser") end) -bind("SUPER + P", dsp.exec_cmd(launcher)) -bind("SUPER + S", function() fn.focusOrLaunch("pavucontrol", "org.pulseaudio.pavucontrol", "org.pulseaudio.pavucontrol") end) -bind("SUPER + V", function() fn.focusOrLaunch("alacritty", "Alacritty") end) + +-- Windows 11 equivalent shortcuts +bind("SUPER + S", dsp.exec_cmd(launcher)) -- Win+S for Search/Launcher +bind("SUPER + R", dsp.exec_cmd(launcher)) -- Win+R for Run +bind("SUPER + E", dsp.exec_cmd("nautilus")) -- Win+E for Explorer +bind("SUPER + V", dsp.exec_cmd("cliphist list | rofi -dmenu -p 'paste' | cliphist decode | " .. copy .. " && " .. paste)) -- Win+V for Clipboard +bind("SUPER + SHIFT + S", function() fn.focusOrLaunch("pavucontrol", "org.pulseaudio.pavucontrol", "org.pulseaudio.pavucontrol") end) -- Window control bind("SUPER + C", dsp.window.close()) +bind("ALT + F4", dsp.window.close()) bind("SUPER + T", dsp.window.float({ action = "toggle" })) bind("SUPER + space", dsp.window.fullscreen({ mode = 1 })) --- BUG FIX: H/J/K were redundantly bound to move_focus AND fullscreen. -bind("SUPER + H", dsp.focus({ direction = "l" })) -bind("SUPER + K", dsp.focus({ direction = "u" })) -bind("SUPER + J", dsp.focus({ direction = "d" })) +-- Cycle Layouts +local layouts = { "dwindle", "master", "scrolling" } +local layout_icons = { dwindle = "", master = "", scrolling = "" } +local layout_idx = 1 + +local function cycle_layout() + layout_idx = (layout_idx % #layouts) + 1 + local new_layout = layouts[layout_idx] + + hl.config({ general = { layout = new_layout } }) + + os.execute("echo '" .. layout_icons[new_layout] .. "' > /tmp/hypr_layout.txt") + os.execute("pkill -RTMIN+8 waybar") +end + +bind("SUPER + right", function() cycle_layout() end) +bind("SUPER + left", function() cycle_layout() end) +bind("SUPER + up", dsp.window.fullscreen({ mode = 1 })) +bind("SUPER + down", function() cycle_layout() end) + +-- XMonad-style cycle & Alt+Tab (using native dsp dispatchers) +bind("SUPER + J", hl.dsp.window.cycle_next()) +bind("SUPER + K", hl.dsp.window.cycle_next({ prev = true })) +bind("ALT + Tab", hl.dsp.window.cycle_next()) +bind("ALT + SHIFT + Tab", hl.dsp.window.cycle_next({ prev = true })) bind("SUPER + X", dsp.exec_cmd("dunstctl close")) bind("SUPER + Y", dsp.exec_cmd("dunstctl close-all")) -- Workspace control -bind("SUPER + right", function() hl.dispatch(hl.dsp.focus({ workspace = "m+1" })) end) -bind("SUPER + left", function() hl.dispatch(hl.dsp.focus({ workspace = "m-1" })) end) +bind("SUPER + CTRL + right", function() hl.dispatch(hl.dsp.focus({ workspace = "m+1" })) end) +bind("SUPER + CTRL + left", function() hl.dispatch(hl.dsp.focus({ workspace = "m-1" })) end) bind("SUPER + SHIFT + H", function() hl.dispatch(hl.dsp.focus({ workspace = "m-1" })) end) bind("SUPER + SHIFT + L", function() hl.dispatch(hl.dsp.focus({ workspace = "m+1" })) end) bind("SUPER + SHIFT + M", function() fn.mv2workspace() end) @@ -233,9 +259,6 @@ bind("SUPER + SHIFT + left", function() fn.moveWorkspace(-1) end) bind("SUPER + SHIFT + right", function() fn.moveWorkspace(1) end) bind("SUPER + ALT + DOWN", function() fn.moveWorkspace(nil, "DP-8") end) --- Cliphist -bind("ALT + V", dsp.exec_cmd("cliphist list | rofi -dmenu -p 'paste' | cliphist decode | " .. copy .. " && " .. paste)) - -- Laptop keys bind("XF86MonBrightnessUp", dsp.exec_cmd("brightnessctl -- set +10%")) bind("XF86MonBrightnessDown", dsp.exec_cmd("brightnessctl -- set -10%"))