7.3 KiB
configs/fwbook/hypr/
Host-specific Hyprland configuration for fwbook. Symlinked to ~/.config/hypr
by the skyg.nixos.desktop.tiler.hyprland module, which defaults its
configName to the machine hostName (configs/${hostName}/hypr).
Why it lives here (and not configs/hypr)
The Hyprland module links configs/<configName>/hypr -> ~/.config/hypr, with
configName defaulting to the hostName. Keeping the config under
configs/fwbook/ lets each host own its own Hyprland tweaks (monitors, etc.)
without stepping on other machines. The old shared configs/hypr/ (waybar +
hyprpanel) was removed when this replaced it.
Config format: Lua
Written in Lua (hyprland.lua), not hyprlang. Hyprland 0.55+ deprecated
hyprlang in favor of Lua, and reads ~/.config/hypr/hyprland.lua. Files are
split under conf/ and pulled in with require().
The folder is named
conf, nothyprland.d, because Hyprland'srequire()treats.as a path separator —require("hyprland.d/env")would resolve tohyprland/d/env.
Design
- Layout: Hyprland's native
scrollinglayout (0.54+), no plugins required. This mirrors niri's scrollable-tiling model. Seeconf/general.lua. - Shell: the Omarchy (nixarchy) shell, launched as
omarchy-launch-shellinconf/autostart.luaviahl.on("hyprland.start", ...). Launched withsetpriv --ambient-caps -allto drop capabilities inherited from the compositor; without it, D-Bus calls inside quickshell-based apps fail silently (hyprwm/Hyprland#14844). There is intentionally no waybar/hyprpanel. Noctalia's binds and window rule are parked inconf/noctalia/(not required byhyprland.lua); seehosts/fwbook/packages.nixfor the shell package wiring.conf/omarchy/maps the same keys to the Omarchy shell's commands (omarchy-menu/omarchy-shell). - Keybinds:
conf/keybindings.luamirrorsconfigs/niri/shared/binds.kdlandconfigs/niri/dms/binds.kdlas closely as Hyprland allows.Mod+Alt+Eopens this file in Zed (zeditor), mirroring niri'sMod+Alt+E->shared/binds.kdl. Windows are moved around withMod+Ctrl+arrows(Mod+Ctrl+Left/Rightmove in a direction,Mod+Ctrl+Up/Downmove to a workspace), and theMod+Shiftmedia/volume binds mirror niri's "Basic Sound Control" block. Hyprland groups/tabs are intentionally unused. - Overview: A standalone Quickshell config (
configs/fwbook/quickshell/overview/, symlinked to~/.config/quickshell/overviewby theskyg.nixos.desktop.tiler.quickshellmodule) provides a niri-like scrolling overview — a vertical stack of workspace rows, each a horizontal strip of that workspace's windows with live screencopy previews. It runs as its ownqs -c overviewdaemon (autostarted inconf/autostart.lua), toggled over Quickshell's IPC (qs -c overview ipc call overview toggle) fromMod+Tab(conf/keybindings.lua) and a 4-finger swipe up/down (conf/inputs.lua). Arrow keys move the selection, Enter focuses + closes, Esc cancels,Mcycles to the next monitor, 1-9 jump straight to a monitor by index. Seeconfigs/fwbook/quickshell/ABOUTME.mdfor the QML implementation.
Files
hypr/
├── hyprland.lua # entry point; require()s conf/*.lua in order
├── screen-record.sh # wf-recorder toggle (bound to Mod+R)
├── speak-selection.nu # piper TTS of primary selection (bound to Mod+M); press again to stop; --cache reuses audio
├── xdph.conf # xdph screencopy workaround (force_shm); hyprlang, read by xdph itself
├── .luarc.json # lua-language-server config (library = ../../hypr-types)
├── dms/ # DMS-auto-generated Hyprland overrides (colors/layout/windowrules);
│ # not loaded by default — require() them from hyprland.lua to enable
└── conf/
├── env.lua # cursor size + Wayland/Qt/Electron env hints (hl.env)
├── general.lua # scrolling layout, gaps/border/rounding (hl.config)
├── animations.lua # workspaces slide = "slidevert" (niri-like); only the `workspaces`
│ # leaf overridden — other styles: slide, fade, slidefade, slidefadevert
├── monitors.lua # hl.monitor per display (from configs/niri/.../outputs.kdl)
├── inputs.lua # touchpad tap + natural scroll, kb us, hl.gesture (incl. Mod+swipe workspace-to-monitor)
├── window-rules.lua # hl.window_rule floats for small dialogs/utilities
├── keybindings.lua # niri binds, scrolling dispatchers (hl.bind/hl.dsp); Mod+Tab toggles the Quickshell overview; Mod+Ctrl moves windows, Mod+Shift is media/volume
├── autostart.lua # Omarchy (nixarchy) shell + Quickshell overview via setpriv (hl.on hyprland.start; drops compositor caps)
├── omarchy/ # Omarchy shell binds (index/binds.lua) — same keys as
│ # noctalia, mapped to omarchy-menu / omarchy-shell
└── noctalia/ # parked noctalia binds + window rule (index/binds/window.lua);
# not required by hyprland.lua while the Omarchy shell runs
Bindings without a clean 1:1 niri mapping
Mod+Shift+H(show-hotkey-overlay) — no native Hyprland equivalent; left commented.Mod+Escape(toggle-keyboard-shortcuts-inhibit) — no native equivalent; omitted.Mod+C(center-column) — Hyprland runs thefocus currentscrolling dispatch.Mod+Ctrl+F(reset-window-height) — the scrolling layout has no per-window height reset, so it maps tolayout "fit active"(resets the focused column to full width).Mod+Tab(toggle-overview) — the Quickshell scrolling overview (see above); previously a pure-Lua wofi picker, then the ScrollOverview plugin, andcyclenextbefore that.
Touchpad gestures (niri parity)
niri's 3-finger swipes are mirrored in conf/inputs.lua:
- Horizontal →
scroll_move(scroll through columns along the tape) - Vertical →
workspace(switch workspaces up/down) - Mod + swipe (any direction) → move the whole workspace to the monitor in
that direction (
hyprctl dispatch movecurrentworkspacetomonitor), mirroring niri'sMod+TouchpadScroll*binds. Swipe direction maps to the same monitor direction (up→up, down→down, left→left, right→right). - 4-finger up/down → open/close the Quickshell scrolling overview (see
Overview above).
hl.gestureis a discrete trigger, so there's no swipe-progress animation.
The gesture action is
scroll_move(underscore), notscrollmove. Themods = "SUPER"mask is what lets the Mod + swipe variants coexist with the plain swipes. Both require a Hyprland new enough to expose configurable Lua gestures (0.55+). The olderscrollmovename and thescrollmoveaction do not exist — they error with "unknown action".
Behavior deltas from the old hyprlang config
Ctrl+Alt+Deleterunsuwsm stop(not theexitdispatcher). The Hyprland wiki warns UWSM users thatexitbreaks the ordered shutdown sequence.Mod+Shift+-/=(window height) uses a fixed pixel delta instead of a percent, since the Luawindow.resizedispatcher takes pixels, not%.