Files
dotfiles/dot_config/hypr/bindings.lua
T

75 lines
3.4 KiB
Lua

-- Keep only your personal keybinding overrides here. Add new bindings or
-- unbind defaults before replacing them.
-- See current bindings and descriptions:
-- omarchy menu keybindings --print
-- To disable every Omarchy default binding, set this in
-- ~/.config/hypr/hyprland.lua before require("default.hypr.omarchy"), then add
-- only the bindings you want below:
-- omarchy_default_bindings = false
-- To disable all preinstalled app/webapp bindings, set:
-- omarchy_preinstalled_bindings = false
-- Add a new binding.
-- o.bind("SUPER + SHIFT + R", "SSH", "alacritty -e ssh your-server")
-- Change an existing binding by unbinding it first, then binding the key again.
-- This example changes SUPER+SPACE from the launcher to the Omarchy root menu.
-- hl.unbind("SUPER + SPACE")
-- o.bind("SUPER + SPACE", "Omarchy menu", "omarchy-menu toggle root")
-- Disable a default binding without replacing it.
-- hl.unbind("SUPER + SHIFT + B")
-- Logitech MX Keys examples:
-- o.bind("SUPER + SHIFT + S", nil, "omarchy-capture-screenshot")
-- o.bind("SUPER + H", nil, "voxtype record toggle")
-- o.bind("SUPER + PERIOD", nil, "omarchy-shell shell toggle omarchy.emojis")
-- Quit the focused application.
hl.unbind("SUPER + Q")
o.bind("SUPER + Q", "Close window", hl.dsp.window.close())
-- Layout toggle (dwindle <-> scrolling) moves to SUPER+W.
hl.unbind("SUPER + W") -- was: close window (SUPER+Q still closes)
o.bind("SUPER + W", "Toggle workspace layout", "omarchy-hyprland-workspace-layout-toggle")
-- Vim-style focus. Free the keys first.
hl.unbind("SUPER + J") -- was: toggle window split
hl.unbind("SUPER + K") -- was: keybindings menu
hl.unbind("SUPER + L") -- was: toggle workspace layout
o.bind("SUPER + H", "Focus on left window", hl.dsp.focus({ direction = "l" }))
o.bind("SUPER + J", "Focus on below window", hl.dsp.focus({ direction = "d" }))
o.bind("SUPER + K", "Focus on above window", hl.dsp.focus({ direction = "u" }))
o.bind("SUPER + L", "Focus on right window", hl.dsp.focus({ direction = "r" }))
-- Optional: put the keybindings menu back on a free key.
-- o.bind("SUPER + SHIFT + /", "Keybindings", "omarchy-menu-keybindings")
-- Optional: move windows with the same keys plus SHIFT.
hl.unbind("SUPER + SHIFT + K")
o.bind("SUPER + SHIFT + H", "Swap window to the left", hl.dsp.window.swap({ direction = "l" }))
o.bind("SUPER + SHIFT + J", "Swap window down", hl.dsp.window.swap({ direction = "d" }))
o.bind("SUPER + SHIFT + K", "Swap window up", hl.dsp.window.swap({ direction = "u" }))
o.bind("SUPER + SHIFT + L", "Swap window to the right", hl.dsp.window.swap({ direction = "r" }))
-- Omarchy App Cycling
o.bind("SUPER + CTRL + ALT + J", "Cycle terminals", "omarchy-cycle-terminal")
o.bind("SUPER + CTRL + ALT + K", "Cycle browsers", "omarchy-cycle-browser")
-- Cycle the focused window through preset sizes.
o.bind("SUPER + R", "Cycle window size", "omarchy-cycle-window-size")
o.bind("SUPER + SHIFT + R", "Cycle window size back", "omarchy-cycle-window-size prev")
-- Mail and messaging.
o.bind("SUPER + CTRL + ALT + E", "Fastmail", { launch = "fastmail", focus = "fastmail" })
o.bind("SUPER + CTRL + ALT + M", "Beeper", { launch = "beeper", focus = "beeper" })
-- Workspaces.
hl.unbind("SUPER + CTRL + K") -- was: Herdr keybindings
o.bind("SUPER + CTRL + J", "Next workspace", hl.dsp.focus({ workspace = "e+1" }))
o.bind("SUPER + CTRL + K", "Previous workspace", hl.dsp.focus({ workspace = "e-1" }))