refactor(hyprland): move terminal keybind into registry #147

Merged
alexion merged 1 commits from feat/hyprland-lua-navigation into main 2026-10-11 16:02:13 -04:00
Owner

Summary

  • Add a keybind registry with an exec action kind.
  • Keep only exec supported for now, so later keybind kinds can extend the same shape.
  • Move the existing Super+Return Ghostty keybind behind that registry, owned by the Ghostty module.
  • Use stable registry entry names and store the rendered chord in keys.
  • Use the Ghostty package path in the rendered command instead of relying on PATH.
  • Add util.registry.predicates.uniquePerHost for per-host registry uniqueness checks.
  • Keep every other navigation keybind out of this Slice 2.1 PR.

Slice 2.1 checklist

  • Add a keybind registry.
  • Use stable registry entry names with keys as the rendered key chord.
  • Support only the exec action kind in this slice.
  • Store the Ghostty command under action.command.
  • Produce the Super+Return entry in the Ghostty module.
  • Reject duplicate key chords with uniquePerHost registry validation.
  • Consume the keybind registry in the Hyprland module.
  • Keep all other navigation bindings deferred.

Verification

  • nix run .#fix
    • Succeeded.
    • Reported the expected unused-declaration warnings from temporarily commented Slice 1 feature binds.
    • Formatter edits to unrelated commented feature modules were reverted to keep this stacked PR focused.
  • bazel run //src/natu:natu -- configs/nixos/modules/desktop/session/hyprland/default.nix configs/nixos/modules/desktop/apps/ghostty.nix configs/nixos/registry/keybind.nix
    • No findings.
  • nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.xdg.configFile."hypr/hyprland.lua".text' | python3 ...
    • Generated 1 hl.bind(...) call.
    • SUPER + Return bound to the Ghostty package path, not bare ghostty.
    • Other navigation binds checked absent from this PR.
  • util.registry.predicates.uniquePerHost rejects duplicate key chords per host while allowing the same chord on different hosts.
## Summary - Add a `keybind` registry with an `exec` action kind. - Keep only `exec` supported for now, so later keybind kinds can extend the same shape. - Move the existing Super+Return Ghostty keybind behind that registry, owned by the Ghostty module. - Use stable registry entry names and store the rendered chord in `keys`. - Use the Ghostty package path in the rendered command instead of relying on `PATH`. - Add `util.registry.predicates.uniquePerHost` for per-host registry uniqueness checks. - Keep every other navigation keybind out of this Slice 2.1 PR. ## Slice 2.1 checklist - [x] Add a `keybind` registry. - [x] Use stable registry entry names with `keys` as the rendered key chord. - [x] Support only the `exec` action kind in this slice. - [x] Store the Ghostty command under `action.command`. - [x] Produce the Super+Return entry in the Ghostty module. - [x] Reject duplicate key chords with `uniquePerHost` registry validation. - [x] Consume the `keybind` registry in the Hyprland module. - [x] Keep all other navigation bindings deferred. ## Verification - `nix run .#fix` - Succeeded. - Reported the expected unused-declaration warnings from temporarily commented Slice 1 feature binds. - Formatter edits to unrelated commented feature modules were reverted to keep this stacked PR focused. - `bazel run //src/natu:natu -- configs/nixos/modules/desktop/session/hyprland/default.nix configs/nixos/modules/desktop/apps/ghostty.nix configs/nixos/registry/keybind.nix` - No findings. - `nix eval --raw '.#nixosConfigurations.zeus.config.home-manager.users.alexion.xdg.configFile."hypr/hyprland.lua".text' | python3 ...` - Generated 1 `hl.bind(...)` call. - `SUPER + Return` bound to the Ghostty package path, not bare `ghostty`. - Other navigation binds checked absent from this PR. - `util.registry.predicates.uniquePerHost` rejects duplicate key chords per host while allowing the same chord on different hosts.
alexion changed title from Restore Hyprland navigation keybinds to Move Hyprland terminal keybind into registry 2026-10-10 14:36:18 -04:00
alexion changed title from Move Hyprland terminal keybind into registry to refactor(hyprland): move terminal keybind into registry 2026-10-10 14:48:23 -04:00
alexion changed target branch from feat/hyprland-lua-config-v2 to main 2026-10-11 16:02:08 -04:00
alexion added 1 commit 2026-10-11 16:02:08 -04:00
alexion merged commit fddec14128 into main 2026-10-11 16:02:13 -04:00
alexion deleted branch feat/hyprland-lua-navigation 2026-10-11 16:02:13 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dev#147