dotfiles/config/hypr/hyprland.conf
Mads Fagerlund d04b17fe52
mbp: move root to btrfs on p8, reclaiming 256G from macOS
Shrinking the macOS APFS container freed ~256G, but it landed at a lower
disk offset than the Linux partitions, so the ext4 root could never be
grown into it — a partition only ever extends into free space that follows
it. Rather than relocate the Asahi stub and ESP (the reliable way to brick
the boot chain), the root moved into the gap as a new partition:

  p8  29424896..96687621  256.6G  btrfs, subvol @, compress=zstd

zstd puts ~70G of data in ~37G, and free space went from 7.3G to 220G.
The old ext4 p5 is left intact as a rollback; generations <= 48 still boot
it, since each generation carries its own root UUID in its initrd.

Also lands the pending work in this tree: postgresql in home.packages,
the deepvis cachix substituter with a root-owned netrc, nixbuild.net as a
builder for both arches, the caffeine stay-awake unit with its SUPER+A
bind, and monthly btrfs autoScrub on the new root.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-04 14:35:28 +02:00

147 lines
4.3 KiB
Text

# -- Monitors & input defaults --
# Monitor layout is host-specific; written by the flake per host.
source = ~/.config/hypr/monitors.conf
device {
name = apple-spi-keyboard
kb_options = caps:ctrl_modifier,grp:win_space_toggle
}
# TrackPoint (Corne nipple): hold middle button + move to scroll, joystick-style
device {
name = corne-tp
scroll_method = on_button_down
scroll_button = 274 # BTN_MIDDLE
scroll_button_lock = false # set true to toggle scroll on/off with a tap instead of holding
}
input {
kb_layout = us,dk
kb_options = grp:win_space_toggle
follow_mouse = 1
repeat_rate = 50
repeat_delay = 300
accel_profile = custom
scroll_points = 0.5 1.0 1.5 2.0 2.5
touchpad {
natural_scroll = true
scroll_factor = 0.9
tap-to-click = false
clickfinger_behavior = true # 2-finger click = right-click, 3-finger = middle (Mac-like)
disable_while_typing = true
}
}
general {
gaps_in = 0
gaps_out = 0
border_size = 0
layout = dwindle
}
animations {
enabled = false
}
dwindle {
preserve_split = true
force_split = 2
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
focus_on_activate = true
}
ecosystem {
no_update_news = true
no_donation_nag = true
}
# -- Environment --
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_STYLE_OVERRIDE,Adwaita-Dark
env = XDG_SCREENSHOTS_DIR,$HOME/Pictures/Screenshots
# -- Autostart --
exec-once = uwsm finalize
exec-once = swaybg -c '#16181a'
exec-once = GDK_BACKEND=wayland eww daemon
exec-once = systemctl --user start hyprpolkitagent
# -- Core --
bind = SUPER, Return, exec, kitty
bind = SUPER, D, exec, fuzzel
bind = SUPER, B, exec, eww open battery-popup
bindr = SUPER, B, exec, eww close battery-popup
bind = SUPER, Q, killactive
bind = SUPER, F, fullscreen, 1
bind = SUPER SHIFT, Space, togglefloating
bind = SUPER, Escape, exec, hyprlock
# Amphetamine-style stay-awake toggle: idle + sleep + lid. See flake.nix.
bind = SUPER, A, exec, caffeine
# -- Focus --
bind = SUPER, h, movefocus, l
bind = SUPER, j, movefocus, d
bind = SUPER, k, movefocus, u
bind = SUPER, l, movefocus, r
# -- Move windows --
bind = SUPER SHIFT, h, movewindow, l
bind = SUPER SHIFT, j, movewindow, d
bind = SUPER SHIFT, k, movewindow, u
bind = SUPER SHIFT, l, movewindow, r
# -- Workspaces --
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER SHIFT, 4, movetoworkspace, 4
bind = SUPER SHIFT, 5, movetoworkspace, 5
# -- Move current workspace to another monitor --
bind = SUPER ALT, h, movecurrentworkspacetomonitor, l
bind = SUPER ALT, l, movecurrentworkspacetomonitor, r
# -- Resize (hold for repeat) --
binde = SUPER CTRL, h, resizeactive, -40 0
binde = SUPER CTRL, j, resizeactive, 0 40
binde = SUPER CTRL, k, resizeactive, 0 -40
binde = SUPER CTRL, l, resizeactive, 40 0
# -- Mouse --
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow
# -- Audio (bindel: locked + repeat; bindl: locked, no repeat) --
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# -- Brightness --
bindel = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
# -- Media --
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPrev, exec, playerctl previous
# -- Screenshots --
# Super+S: region -> clipboard
bind = SUPER, S, exec, grimblast --notify copy area
# Super+Ctrl+S: full screen -> file + clipboard
bind = SUPER CTRL, S, exec, grimblast --notify copysave screen
# Super+Shift+S: region -> file + clipboard + open in GIMP
bind = SUPER SHIFT, S, exec, bash -c 'mkdir -p "$HOME/Pictures/Screenshots"; f="$HOME/Pictures/Screenshots/$(date +%Y-%m-%dT%H-%M-%S).png"; grimblast --notify --freeze save area "$f" && wl-copy --type image/png < "$f" && gimp "$f"'