feat(keyboard): multi-layout cycle bind + summer-bar language parity
All checks were successful
Check / eval (push) Successful in 2m59s
All checks were successful
Check / eval (push) Successful in 2m59s
SUPER+SHIFT+K → hyprctl switchxkblayout current next, rendered only
when the session layout has a comma — the same gate as the Waybar
language indicator. Bind data is a separate multiLayoutBinds list in
keybinds.nix (still one source); hyprland.nix and the rofi cheatsheet
gate on the identical condition, so bind and cheatsheet cannot drift.
`current` targets the focused keyboard, so per-device-overridden
boards (single layout) are a no-op.
Parity: hyprland/language (with the keyboard glyph) added to both
summer waybar.jsonc whole-swaps + #language in their CSS. Static JSON
cannot eval-gate, so on summer themes the module shows even with one
layout — parity-over-minimalism, deliberate. Found en route:
summer-night has an idle_inhibitor the generated bar lacks (reverse
gap) — folded into backlog item 13.
Also — agent/BACKLOG.md gains items 21-24 from Bernardo's Latitude
5410 hardware QA (waybar crash on theme switch + no respawn; nameless
network-menu rows; a no-update sys-rebuild; Back-everywhere audit),
queued ahead of everything; HARDWARE-QUEUE's snapshot re-test now
carries the "update to >= a47aa3a + relogin" precondition, since
findings 5/6 match the pre-polkit-agent behavior exactly.
Verified: V0 (flake check, both summer JSONs parse) + V1 both
directions (default single-layout build renders no bind; us,de via
extendModules renders bind AND cheatsheet row). V3 cycle check queued.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -304,8 +304,13 @@ in
|
||||
# Rendered from ./keybinds.nix (the cheatsheet reads the same list),
|
||||
# plus the generated per-workspace binds. Like exec-once above this
|
||||
# stays a normal-priority list, so a downstream `bind = [...]`
|
||||
# concatenates rather than replaces.
|
||||
bind = map mkBind keybinds.binds ++ workspaceBinds;
|
||||
# concatenates rather than replaces. The layout-cycle bind only
|
||||
# exists when there is something to cycle (same comma condition
|
||||
# the Waybar language indicator gates on).
|
||||
bind = map mkBind (keybinds.binds
|
||||
++ lib.optionals (lib.hasInfix "," config.nomarchy.keyboard.layout)
|
||||
keybinds.multiLayoutBinds)
|
||||
++ workspaceBinds;
|
||||
|
||||
# Media keys via swayosd-client: it performs the action AND shows
|
||||
# the on-screen display (the nomarchy.osd module). e = repeat,
|
||||
|
||||
@@ -59,6 +59,15 @@
|
||||
{ mods = ""; key = "Print"; action = "exec, grim -g \"$(slurp)\" - | wl-copy"; desc = "Screenshot region → clipboard"; }
|
||||
];
|
||||
|
||||
# Rendered only when the session has >1 layout (a comma in
|
||||
# nomarchy.keyboard.layout) — hyprland.nix and rofi.nix both gate on
|
||||
# that same condition, so the bind and its cheatsheet row stay in
|
||||
# step. `current` targets the focused keyboard, so a board with its
|
||||
# own per-device layout (a single one) is a no-op, never a leak.
|
||||
multiLayoutBinds = [
|
||||
{ mods = "$mod SHIFT"; key = "K"; action = "exec, hyprctl switchxkblayout current next"; desc = "Cycle keyboard layout"; }
|
||||
];
|
||||
|
||||
extra = [
|
||||
{ keys = "SUPER + 1-9"; desc = "Switch to workspace 1-9"; }
|
||||
{ keys = "SUPER + SHIFT + 1-9"; desc = "Move window to workspace 1-9"; }
|
||||
|
||||
@@ -119,7 +119,9 @@ let
|
||||
key = lib.replaceStrings [ "question" "slash" ] [ "?" "/" ] b.key;
|
||||
in prefix + key;
|
||||
cheatRows =
|
||||
map (b: padRight 22 (prettyKeys b) + b.desc) keybinds.binds
|
||||
map (b: padRight 22 (prettyKeys b) + b.desc) (keybinds.binds
|
||||
++ lib.optionals (lib.hasInfix "," cfg.keyboard.layout)
|
||||
keybinds.multiLayoutBinds)
|
||||
++ map (e: padRight 22 e.keys + e.desc) keybinds.extra;
|
||||
cheatsheetFile = pkgs.writeText "nomarchy-keybinds.txt"
|
||||
(lib.concatStringsSep "\n" cheatRows + "\n");
|
||||
|
||||
Reference in New Issue
Block a user