feat(config): add niri-style keybindings and layout adjustments

This commit is contained in:
Prad Nukala committed 2026-10-13 18:43:54 -04:00
1 parent 32d4fccb2b
commit d8f5d10f05
4 files changed
+44 -13

No files matched your search

+10
View File
@@ -314,3 +314,13 @@ o.bind("SUPER + ALT + SHIFT + F", "File manager (cwd)", { launch = 'flea --gui "
-- flea --picker: begin. Written by `flea --picker`; `flea --picker off` removes the block whole. -- flea --picker: begin. Written by `flea --picker`; `flea --picker off` removes the block whole.
o.window("com.thisisgm.flea.picker", { tag = "+floating-window" }) o.window("com.thisisgm.flea.picker", { tag = "+floating-window" })
-- flea --picker: end. -- flea --picker: end.
-- niri-style: SUPER + F maximizes (Omarchy's SUPER + ALT + F "Full width"),
-- SUPER + SHIFT + F goes true fullscreen. Kept below the flea blocks so it
-- wins over the file-manager bind `flea --default` writes onto
-- SUPER + SHIFT + F; flea stays on SUPER + ALT + SHIFT + F, Nautilus on
-- SUPER + CTRL + ALT + F.
hl.unbind("SUPER + F") -- was: full screen
o.bind("SUPER + F", "Maximize", hl.dsp.window.fullscreen({ mode = "maximized" }))
hl.unbind("SUPER + SHIFT + F") -- was: file manager (flea --gui)
o.bind("SUPER + SHIFT + F", "Full screen", hl.dsp.window.fullscreen({ mode = "fullscreen" }))
+2 -2
View File
@@ -55,8 +55,8 @@ o.window([[^tldraw-offline$]], { workspace = "5", fullscreen = true })
-- Scratch workspaces, toggled by ~/.local/bin/omarchy-toggle-scratch, which -- Scratch workspaces, toggled by ~/.local/bin/omarchy-toggle-scratch, which
-- also starts any resident that is missing and picks the monitor. Pinning -- also starts any resident that is missing and picks the monitor. Pinning
-- the residents here means they land on their workspace no matter who starts -- the residents here means they land on their workspace no matter who starts
-- them; "silent" leaves the reveal to the script. Under the master layout the -- them; "silent" leaves the reveal to the script. Under the scrolling layout
-- first window to appear takes the master slot; the rest stack beside it. -- each resident gets its own column, in the order they appear.
-- --
-- SUPER + A / SUPER + CTRL + S: Tern; SUPER + SHIFT + A: Claude Desktop. -- SUPER + A / SUPER + CTRL + S: Tern; SUPER + SHIFT + A: Claude Desktop.
-- Each alone on its own workspace, Studio Display. Tern has no per-window -- Each alone on its own workspace, Studio Display. Tern has no per-window
+17 -7
View File
@@ -18,9 +18,25 @@ hl.config({
input = { input = {
repeat_delay = 250, repeat_delay = 250,
repeat_rate = 50, repeat_rate = 50,
-- niri has no focus-follows-mouse: hovering gives a window pointer focus
-- (scroll goes there) but keyboard focus moves only on click. Also keeps
-- the scrolling tape from jumping when the cursor brushes a neighbour.
follow_mouse = 2,
-- niri: touchpad { natural-scroll; tap; }. Tap-to-click is libinput's
-- default already.
touchpad = {
natural_scroll = true,
},
}, },
}) })
-- niri's built-in touchpad gestures: three fingers sideways scroll the tape,
-- up/down switch workspace.
hl.gesture({ fingers = 3, direction = "horizontal", action = "scroll_move" })
hl.gesture({ fingers = 3, direction = "vertical", action = "workspace" })
-- Keyboard layout and options. -- Keyboard layout and options.
-- See https://wiki.hypr.land/Configuring/Basics/Variables/#input -- See https://wiki.hypr.land/Configuring/Basics/Variables/#input
-- hl.config({ -- hl.config({
@@ -68,13 +84,7 @@ hl.config({
-- o.window("(Alacritty|kitty|foot)", { scroll_touchpad = 1.5 }) -- o.window("(Alacritty|kitty|foot)", { scroll_touchpad = 1.5 })
-- o.window("com.mitchellh.ghostty", { scroll_touchpad = 0.2 }) -- o.window("com.mitchellh.ghostty", { scroll_touchpad = 0.2 })
-- Enable touchpad gestures for changing workspaces. -- Touchpad gestures live in the override block at the top of this file.
-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Gestures/
-- hl.gesture({ fingers = 3, direction = "horizontal", action = "workspace" })
-- Enable touchpad gestures for moving focus (helpful on scrolling layout).
-- hl.gesture({ fingers = 3, direction = "left", action = function() hl.dispatch(hl.dsp.focus({ direction = "l" })) end })
-- hl.gesture({ fingers = 3, direction = "right", action = function() hl.dispatch(hl.dsp.focus({ direction = "r" })) end })
-- Tablets / pens. -- Tablets / pens.
-- Hyprland maps a tablet across the *whole* monitor layout by default -- Hyprland maps a tablet across the *whole* monitor layout by default
+15 -4
View File
@@ -22,10 +22,18 @@
-- opt every window out again except the terminals below. -- opt every window out again except the terminals below.
hl.config({ hl.config({
general = { general = {
-- Master instead of Omarchy's dwindle. Per-workspace layouts saved by -- Scrolling (niri-style tape) instead of Omarchy's dwindle. Per-workspace
-- omarchy-hyprland-workspace-layout-toggle (~/.local/state/omarchy/ -- layouts saved by omarchy-hyprland-workspace-layout-toggle (SUPER + W;
-- workspace-layouts/*.lua) still win for the workspaces they name. -- ~/.local/state/omarchy/workspace-layouts/*.lua) still win for the
layout = "master", -- workspaces they name.
layout = "scrolling",
-- niri's layout `gaps` is unset, so its default 16 applies: 16 logical px
-- between windows and at the screen edge. Hyprland pads each side of a
-- window by gaps_in, so two neighbours sit 2 * gaps_in apart.
-- ~/.local/bin/omarchy-pip and omarchy-smart-move inset by gaps_out too.
gaps_in = 8,
gaps_out = 16,
}, },
decoration = { decoration = {
@@ -135,5 +143,8 @@ hl.config({
focus_fit_method = 1, focus_fit_method = 1,
-- niri keeps a lone column at its own width instead of filling the screen. -- niri keeps a lone column at its own width instead of filling the screen.
fullscreen_on_one_column = false, fullscreen_on_one_column = false,
-- niri stops at the first/last column instead of wrapping around.
wrap_focus = false,
wrap_swapcol = false,
}, },
}) })