From b9749dd6a2dd26adbbf384b62266e53296396df3 Mon Sep 17 00:00:00 2001 From: alexion Date: Wed, 22 Jul 2026 09:02:51 -0400 Subject: [PATCH] fix(desktop): correct dwindle keybinds and speed up the terminal Two issues surfaced on the live neogaia session. Hyprland rejected two names at load: the split toggle is a dwindle layout message reached through layoutmsg, not a top-level dispatcher, and dwindle:pseudotile no longer exists in this version. Bind Super+T via layoutmsg and drop the pseudotile option. Ghostty also cold-started GTK on every launch. Configure it through home-manager with gtk-single-instance so windows after the first open in the existing process. Record the dispatcher/option version-drift trap in CLAUDE.md. --- CLAUDE.md | 4 ++++ modules/desktop/hyprland/hyprland.nix | 4 ++-- modules/desktop/terminal.nix | 9 +++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c41fde5..cd367a7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -102,3 +102,7 @@ The domain model (Host, Module, Skeleton, Auto-loader, Enable convention, overla The Lua backend mangles `$mod`-style variables and INI `bind=` strings into invalid Lua (`hl.$mod("SUPER")`), and does not fail the build, since the config is only text. Set `configType = "hyprlang"` to get the native `hyprland.conf` whose variable and bind syntax the usual settings are written in. Render the file to check which format is in effect: `nix build --print-out-paths .#nixosConfigurations..config.home-manager.users..xdg.configFile.\"hypr/hyprland.conf\".source` (only the enabled `configType`'s key exists). +- An invalid Hyprland dispatcher or config-option name never fails the nix build, since `hyprland.conf` is only text, so it surfaces only when the compositor loads the file at login. + The build/render check is therefore blind to it, and the real test is a running session (or reading `~/.config/hypr/hyprland.conf` against the running package's own names). + Two that bit on 0.55.4: the dwindle split actions `togglesplit`, `swapsplit`, and `pseudo` are layout messages reached through the `layoutmsg` dispatcher (`bind = $mod, T, layoutmsg, togglesplit`), not top-level dispatchers, and the old `dwindle:pseudotile` option is gone. + Confirm names against the pinned package rather than the wiki, whose "latest" drifts from it. diff --git a/modules/desktop/hyprland/hyprland.nix b/modules/desktop/hyprland/hyprland.nix index 91f0048..6c1d53b 100644 --- a/modules/desktop/hyprland/hyprland.nix +++ b/modules/desktop/hyprland/hyprland.nix @@ -94,7 +94,6 @@ in }; dwindle = { - pseudotile = true; preserve_split = true; }; @@ -121,7 +120,8 @@ in "$mod, Space, togglefloating," "$mod, F, fullscreen," - "$mod, T, togglesplit," + # togglesplit is a dwindle layout message, reached through layoutmsg. + "$mod, T, layoutmsg, togglesplit" "$mod SHIFT, Q, killactive," "$mod CTRL, Q, forcekillactive," ] diff --git a/modules/desktop/terminal.nix b/modules/desktop/terminal.nix index 876eeda..ab69acb 100644 --- a/modules/desktop/terminal.nix +++ b/modules/desktop/terminal.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, ... }: # Ghostty as the desktop terminal. @@ -13,6 +12,12 @@ in options.modules.desktop.terminal.enable = lib.mkEnableOption "Ghostty as the desktop terminal"; config = lib.mkIf cfg.enable { - home-manager.users.${user}.home.packages = [ pkgs.ghostty ]; + home-manager.users.${user}.programs.ghostty = { + enable = true; + + # Reuse a single process, so each window after the first opens instantly + # instead of paying a fresh GTK startup. + settings.gtk-single-instance = true; + }; }; }