bringing back hyprland

This commit is contained in:
ari committed 2026-08-25 17:04:33 -04:00
1 parent aa41228d27
commit 9d9a890877
43 files changed
+976 -1036

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
# 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.
## Design
- **Layout:** Hyprland's native `scrolling` layout (0.54+), no plugins required.
This mirrors niri's scrollable-tiling model. See `hyprland.d/general.conf`.
- **Shell:** noctalia (`noctalia-shell`), autostarted in `hyprland.d/autostart.conf`.
There is intentionally no waybar/hyprpanel here.
- **Keybinds:** `hyprland.d/keybindings.conf` mirrors `configs/niri/shared/binds.kdl`
and `configs/niri/noctalia/binds.kdl` as closely as Hyprland allows.
- **Overview:** there is no native Hyprland overview, and no overview plugin that
reliably builds against current Hyprland (hyprexpo was retired from the
official plugins repo; the community fork chases `main`). `Mod+Tab` falls back
to `cyclenext` instead of niri's `toggle-overview`.
## Files
```
hypr/
├── hyprland.conf # variables + sources hyprland.d/*.conf
├── screen-record.sh # wf-recorder toggle (bound to Mod+R)
└── hyprland.d/
├── env.conf # cursor size + Wayland/Qt/Electron env hints
├── general.conf # scrolling layout, gaps/border/rounding
├── monitors.conf # translated from configs/niri/shared/outputs.kdl
├── inputs.conf # touchpad tap + natural scroll, kb us, swipe
├── window-rules.conf # float small dialogs/utilities
├── keybindings.conf # niri + noctalia binds, scrolling dispatchers
└── autostart.conf # noctalia, hypridle (via UWSM)
```
## 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+W` (toggle-column-tabbed-display) — mapped to `togglegroup` as the nearest analog.
- `Mod+Tab` (toggle-overview) — no native overview / no buildable plugin; mapped to `cyclenext`.
- Workspace-to-monitor moves (niri used touchpad scroll) — approximated with
`Mod + mouse wheel`.
+26
View File
@@ -0,0 +1,26 @@
# =========================
# Hyprland (fwbook)
# =========================
# Mirrors the niri setup in configs/niri, adapted to Hyprland's native
# scrolling layout + the noctalia shell. This directory is symlinked to
# ~/.config/hypr by the skyg hyprland module
# (skyg.nixos.desktop.tiler.hyprland), defaulting to configs/${hostName}/hypr.
# =========================
# Variables
# =========================
$mainMod = SUPER
$terminal = ghostty
$browser = chromium
$fileManager = nautilus
# =========================
# Sourced configuration
# =========================
source = ~/.config/hypr/hyprland.d/env.conf
source = ~/.config/hypr/hyprland.d/general.conf
source = ~/.config/hypr/hyprland.d/monitors.conf
source = ~/.config/hypr/hyprland.d/inputs.conf
source = ~/.config/hypr/hyprland.d/window-rules.conf
source = ~/.config/hypr/hyprland.d/keybindings.conf
source = ~/.config/hypr/hyprland.d/autostart.conf
@@ -0,0 +1,11 @@
# =========================
# Autostart
# =========================
# Launched via UWSM (`uwsm app --`) so processes land in the correct
# systemd scope for the graphical session.
# noctalia shell (bar / launcher / control center / notifications)
exec-once = uwsm app -- noctalia-shell
# Idle management
exec-once = uwsm app -- hypridle
+11
View File
@@ -0,0 +1,11 @@
# =========================
# Environment
# =========================
# Mirrors the environment block in configs/niri/shared/general.kdl.
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
env = NIXOS_OZONE_WL,1
env = QT_QPA_PLATFORM,wayland
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = ELECTRON_OZONE_PLATFORM_HINT,auto
@@ -0,0 +1,36 @@
# =========================
# General / Layout
# =========================
# Native scrolling layout (Hyprland 0.54+) — no plugins needed. This mirrors
# niri's scrollable-tiling model. Gaps/border/corner-radius mirror
# configs/niri/shared/layout.kdl (gaps 5, border 2, corner radius 12).
general {
gaps_in = 5
gaps_out = 5
border_size = 2
layout = scrolling
resize_on_border = true
}
decoration {
rounding = 12
}
# https://wiki.hypr.land/Configuring/Layouts/Scrolling-Layout/
scrolling {
# Default column width as a fraction of the screen [0.1 - 1.0].
column_width = 0.5
# A lone column fills the screen (matches niri's single-column feel).
fullscreen_on_one_column = true
# Center the focused column when it comes into view (niri-like).
focus_fit_method = 0
follow_focus = true
explicit_column_widths = 0.333, 0.5, 0.667, 1.0
}
# Disable Hyprland's built-in hot-corner-esque behaviours (niri: hot-corners off).
misc {
disable_hyprland_logo = true
focus_on_activate = true
}
@@ -0,0 +1,26 @@
# =========================
# Input
# =========================
# Mirrors configs/niri/shared/general.kdl (touchpad tap + natural scroll)
# and the old inputs (kb_layout = us).
input {
kb_layout = us
follow_mouse = 1
touchpad {
natural_scroll = true
tap-to-click = true
disable_while_typing = true
}
touchscreen {
transform = 0
}
}
# Three-finger horizontal swipe to move across workspaces (niri-like).
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
}
@@ -0,0 +1,123 @@
# =========================
# Keybindings
# =========================
# Mirrors configs/niri/shared/binds.kdl and configs/niri/noctalia/binds.kdl,
# adapted to Hyprland's scrolling-layout dispatchers (layoutmsg ...).
$mainMod = SUPER
# =========================
# General / Apps
# =========================
# niri: Mod+Shift+H show-hotkey-overlay — no native Hyprland equivalent.
# bind = $mainMod SHIFT, H, exec, <hotkey overlay tool>
bind = $mainMod, T, exec, $terminal
bind = $mainMod, B, exec, $browser
bind = $mainMod, E, exec, wofi-emoji
bind = $mainMod, Q, killactive
# =========================
# Navigation
# =========================
bind = $mainMod, Left, movefocus, l
bind = $mainMod, Right, movefocus, r
# niri workspaces are vertical stacks; map Up/Down to workspace switching.
bind = $mainMod, Up, workspace, e-1
bind = $mainMod, Down, workspace, e+1
# niri: toggle-overview — no native Hyprland overview (and no maintained plugin
# that builds against current Hyprland), so fall back to cycling windows.
bind = $mainMod, Tab, cyclenext
# niri: focus-monitor-next
bind = $mainMod SHIFT, Tab, focusmonitor, +1
# =========================
# Window Management
# =========================
# niri swap-window-left/right -> scrolling swapcol
bind = $mainMod CTRL, Right, layoutmsg, swapcol r
bind = $mainMod CTRL, Left, layoutmsg, swapcol l
# niri move-window-to-workspace-up/down
bind = $mainMod CTRL, Up, movetoworkspace, e-1
bind = $mainMod CTRL, Down, movetoworkspace, e+1
# niri: toggle-column-tabbed-display (closest: group/tab windows together)
bind = $mainMod, W, togglegroup
# niri: maximize-column (fill screen, keep bar)
bind = $mainMod, F, fullscreen, 1
# niri: fullscreen-window (true fullscreen)
bind = $mainMod SHIFT, F, fullscreen, 0
# niri: reset-window-height (scrolling has no per-window height; refit column)
bind = $mainMod CTRL, F, layoutmsg, fit_into_view
# niri: toggle-window-floating
bind = $mainMod, V, togglefloating
# niri: center-column (recenter focused column in view)
bind = $mainMod, C, layoutmsg, focus current
# =========================
# Resizing
# =========================
# niri set-column-width -/+10% -> scrolling colresize
bind = $mainMod, Minus, layoutmsg, colresize -0.1
bind = $mainMod, Equal, layoutmsg, colresize +0.1
# niri set-window-height -/+10%
bind = $mainMod SHIFT, Minus, resizeactive, 0 -10%
bind = $mainMod SHIFT, Equal, resizeactive, 0 +10%
# =========================
# Screenshots & Recording
# =========================
bind = , Print, exec, grim -g "$(slurp)" - | satty -f -
bind = $mainMod, P, exec, grim -g "$(slurp)" - | satty -f -
bind = $mainMod, R, exec, ~/.config/hypr/screen-record.sh
# =========================
# Session
# =========================
# niri: Mod+Escape toggle-keyboard-shortcuts-inhibit — no native equivalent.
bind = CTRL ALT, Delete, exit
# =========================
# Monitor Movement
# =========================
# niri move-column-to-monitor-{down,left,right,up}
bind = $mainMod ALT, Down, movewindow, mon:d
bind = $mainMod ALT, Left, movewindow, mon:l
bind = $mainMod ALT, Right, movewindow, mon:r
bind = $mainMod ALT, Up, movewindow, mon:u
# niri moved workspaces between monitors via touchpad scroll; approximate with
# Mod + mouse wheel (move current workspace to next/prev monitor).
bind = $mainMod, mouse_down, movecurrentworkspacetomonitor, +1
bind = $mainMod, mouse_up, movecurrentworkspacetomonitor, -1
# =========================
# Mouse drag (move / resize windows)
# =========================
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# =========================
# Noctalia shell (mirrors configs/niri/noctalia/binds.kdl)
# =========================
bind = $mainMod, Space, exec, noctalia-shell ipc call launcher toggle
bind = $mainMod, S, exec, noctalia-shell ipc call controlCenter toggle
bind = $mainMod, Comma, exec, noctalia-shell ipc call settings toggle
# Clipboard history
bind = $mainMod ALT, P, exec, rofi -modi "clipboard:greenclip print" -show clipboard
# Dismiss all notifications
bind = $mainMod ALT, L, exec, noctalia-shell ipc call notifications dismissAll
# Media & brightness
bind = $mainMod SHIFT, Up, exec, noctalia-shell ipc call volume increase
bind = $mainMod SHIFT, Down, exec, noctalia-shell ipc call volume decrease
bind = $mainMod SHIFT, Right, exec, playerctl next
bind = $mainMod SHIFT, Left, exec, playerctl previous
bind = $mainMod SHIFT, Space, exec, playerctl play-pause
bindl = , XF86AudioRaiseVolume, exec, noctalia-shell ipc call volume increase
bindl = , XF86AudioLowerVolume, exec, noctalia-shell ipc call volume decrease
bindl = , XF86AudioMute, exec, noctalia-shell ipc call volume muteOutput
bindl = , XF86MonBrightnessUp, exec, noctalia-shell ipc call brightness increase
bindl = , XF86MonBrightnessDown, exec, noctalia-shell ipc call brightness decrease
@@ -0,0 +1,24 @@
# =========================
# Monitors
# =========================
# Translated from configs/niri/shared/outputs.kdl.
# Format: monitor = name-or-desc, resolution@hz, positionXxY, scale
# Laptop internal panel
monitor = eDP-1, 2256x1504@60, 859x1080, 1.5
# Work monitor (ASUS VE278)
monitor = desc:Ancor Communications Inc ASUS VE278 E5LMTF016849, 1920x1080@60, 1027x0, 1
# Assorted external displays
monitor = DP-9, 1920x1080@74.97, 0x0, 1
monitor = desc:Samsung Electric Company S22R35x H4TR604392, 1920x1080@60, 106x0, 1
monitor = DP-10, 1920x1080@74.97, 1920x0, 1
monitor = desc:Samsung Electric Company S22R35x H4TR503886, 1920x1080@60, 2026x0, 1
monitor = desc:PNP(GWD) ARZOPA, 1920x1080@60, 2860x1080, 1
monitor = DP-2, 1920x1080@60, 3115x1504, 1
monitor = desc:Dell Inc. DELL SE3223Q 1WDWKK3, preferred, 4780x0, 2
monitor = desc:Dell Inc. DELL SE3223Q 1TRXKK3, preferred, 6700x0, 2
# Fallback for anything not explicitly configured above
monitor = , preferred, auto, auto
@@ -0,0 +1,13 @@
# =========================
# Window Rules
# =========================
# Rounding/clip is handled globally in general.conf (decoration.rounding = 12),
# mirroring the niri window-rule (geometry-corner-radius 12, clip-to-geometry).
# Below: float the small control/dialog utilities so they don't tile.
windowrulev2 = float, class:^(pavucontrol)$
windowrulev2 = float, class:^(blueman-manager)$
windowrulev2 = float, class:^(org.gnome.Calculator)$
windowrulev2 = float, title:^(Open File)$
windowrulev2 = float, title:^(Save File)$
windowrulev2 = float, class:^(xdg-desktop-portal-gtk)$
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
set -e
_SCREEN_RECORD_DIR="$HOME/Videos/ScreenRecordings"
mkdir -p "$_SCREEN_RECORD_DIR"
if pgrep -x "wf-recorder" > /dev/null; then
last_cmd=$(pgrep -x "wf-recorder" -a)
filepath="${last_cmd##* -f }"
filepath="${filepath%% *}"
pgrep -x "wf-recorder" && pkill -INT -x wf-recorder
notify-send -h string:wf-recorder:record -t 5000 "Finished Recording. Saved at $filepath."
echo $filepath | xclip -selection clipboard
exit 0
fi
dims=$(slurp)
notify-send -h string:wf-recorder:record -t 1000 "Recording in:" "<span color='#90a4f4' font='26px'><i><b>3</b></i></span>"
sleep 1
notify-send -h string:wf-recorder:record -t 1000 "Recording in:" "<span color='#90a4f4' font='26px'><i><b>2</b></i></span>"
sleep 1
notify-send -h string:wf-recorder:record -t 950 "Recording in:" "<span color='#90a4f4' font='26px'><i><b>1</b></i></span>"
sleep 1
dateTime=$(date +%Y-%m-%d-%H_%M_%S)
wf-recorder --bframes max_b_frames -g "${dims}" -f $_SCREEN_RECORD_DIR/$dateTime.mp4