Files
nixfiles/home/KEYBINDINGS.md
T
lyrathorpeandEmma Thorpe 128deca2e3
CI / flake (push) Successful in 3m26s
refactor(flake): user registry, multi-user hosts, and portable home outputs (#49)
## Summary

Separates user identity (data) from the reusable Nix modules and lets a host declare any number of users, replacing the previous one-user-per-host structure. Also restructures the tree and exposes the home config for use off these hosts.

## Changes

- **User registry** (`users/registry.nix`): per-user identity (name, email, groups, authorized + signing keys) as the single source of truth; no user data hardcoded in modules.
- **Multi-user `mkHost`**: a host declares a `users` set keyed by username; per-user identity is injected into each home config via the `identity` module arg.
- **Restructured layout**: `users/`, `home/`, `modules/`, `hosts/`, `lib/` replace the former `lyrathorpe/` and `system/` trees.
- **Portable outputs**: standalone `homeConfigurations."<user>@<system>"` (the portable subset — shell, git, editor, claude) plus an exported `homeModules` for use on machines not managed by this flake, or as an input to other flakes.
- Docs (`README.md`, `home/README.md`) and `.gitignore` updated for the new paths.

## Fixes

- Closes #46 — shared user module authorized one user's SSH key for every account.
- Closes #47 — git committer identity hardcoded as defaults instead of per-user.
- Closes #48 — EDaaS systemd linger hardcoded to a literal username.

## Verification

- `nix flake check` passes: treefmt, deadnix, statix, pre-commit, and evaluation of all NixOS hosts + Darwin + homeConfigurations.
- Derivation-path comparison vs `main`: `lyrathorpe-mbp` and `emmathorpe-edaas` are byte-identical; `lyrathorpe-t400`, `lyrathorpe-macpro31` and `lyrathorpe-rpi5` differ only by de-duplicating a repeated `authorized_keys` entry (confirmed with nix-diff — no other change).
- Standalone `homeConfigurations."lyrathorpe@x86_64-linux".activationPackage` builds.

## Notes

- `emmathorpe` has no personal authorized key yet (it previously inherited Lyra's key via the bug in #46); the registry entry is intentionally empty — add a real key if SSH login as `emmathorpe` is wanted (moot on the WSL host).
- A two-repo (public dotfiles / private systems) split is deferred by design; this internal restructure is the prerequisite for it.

---------

Co-authored-by: Emma Thorpe <emma.thorpe@citrix.com>
Reviewed-on: #49
2026-06-29 13:06:23 +01:00

13 KiB

Keybindings reference

Every keyboard shortcut configured across this desktop, and where it is defined. Everything here is managed declaratively through Nix — edit the listed file and rebuild, never the generated dotfiles.

Area Defined in
Sway (compositor) sway.nix config.keybindings + config.modes, plus the home-manager Sway module's built-in defaults
tmux shell.nix programs.tmux
zsh line editor shell.nix programs.zsh.historySubstringSearch
Neovim editor.nix programs.nixvim
foot (terminal) foot package defaults — only colours are themed (in sway.nix)

Conventions

  • Super is the Mod4 / logo (Windows/Command) key; Alt is Mod1.
  • Letter keys are keysyms (the character produced), not physical positions. The keyboard is Dvorak (us/dvorak), so e.g. "Super+s" is whatever key types s in Dvorak.
  • Shortcuts apply to every Sway host (MBP, T400, Mac Pro); brightness keys are laptop-only, as noted.

Sway

Applications & session

Shortcut Action
Super+Return Open a terminal (foot)
Super+Space App launcher (sway-launcher-desktop in a floating foot)
Super+d App launcher (same as above; module default)
Super+e File manager (nemo)
Super+c Clipboard history picker (clipman → fuzzel)
Super+l Lock screen (swaylock)
Super+Shift+q Close the focused window
Super+Shift+c Reload the Sway config
Super+Shift+e Exit Sway (asks for confirmation)

Focus

Shortcut Action
Super+/// Move focus by direction
Super+h/j/k Move focus left / down / up (vim-style)
Super+a Focus the parent container
Super+Alt+Space Toggle focus between tiling and floating

Note: vim focus-right would be Super+l, but that is bound to lock here; use Super+.

Moving windows

Shortcut Action
Super+Shift+/// Move the window by direction
Super+Shift+h/j/k/l Move the window left / down / up / right
Super+Shift+Space Toggle the window floating

Mouse (with Super held): left-drag moves a window, right-drag resizes it.

Layout

Shortcut Action
Super+b Split horizontally
Super+v Split vertically
Super+s Stacking layout
Super+w Tabbed layout
Super+f Toggle fullscreen
Super+y Layout submenu: s stacking · w tabbed · e toggle split · Return/Esc exit

The layout submenu's e (toggle split) is the home for that action since Super+e now opens the file manager.

Workspaces

Shortcut Action
Super+10 Switch to workspace 1…10
Super+Shift+10 Move the window to workspace 1…10
Super+z Previous workspace
Super+x Next workspace

Scratchpad

Shortcut Action
Super+Shift+- Move the window to the scratchpad
Super+- Show / cycle the scratchpad

Modes (submenus)

Shortcut Action
Super+r Resize mode: arrow keys resize; Return/Esc exit
Super+y Layout mode (see Layout above)
Super+Shift+x Power menu: l lock · e log out · s sleep · r reboot · Shift+s shutdown · Return/Esc exit

Screenshots

Shortcut Action
Print Select a region → swappy (annotate/save)
Shift+Print Focused window → swappy

Audio & media

Shortcut Action
XF86AudioRaiseVolume / XF86AudioLowerVolume Volume ±5% (wpctl)
XF86AudioMute Toggle output mute
XF86AudioMicMute Toggle microphone mute
XF86AudioPlay Play/pause (playerctl)
XF86AudioNext / XF86AudioPrev Next / previous track

Brightness — laptops only

Shortcut Action
XF86MonBrightnessUp / XF86MonBrightnessDown Backlight ±5% (brightnessctl)

Present only on portable hosts (T400, MBP); desktops have no internal backlight.


tmux

Prefix is Ctrl+b (default). Copy mode uses vi keys.

Shortcut Action
Ctrl+b then v Split into left/right panes
Ctrl+b then s Split into top/bottom panes
Ctrl+h/j/k/l Move between panes — and into/out of vim splits — seamlessly (vim-tmux-navigator, no prefix)
Alt+/// Switch pane by direction (no prefix needed)
Ctrl+b then [ Enter copy mode (then vi motions; Space/Enter to select/copy)
Ctrl+b then z Zoom / unzoom the focused pane
Ctrl+b then c New window
Ctrl+b then n / p Next / previous window
Ctrl+b then d Detach
Ctrl+b then Ctrl+s / Ctrl+r Save / restore the session (resurrect; continuum also auto-saves and restores on start)
Mouse Enabled — click to focus, drag borders, scroll, select

The stock split keys % and " are unbound; use v / s above. Ctrl+b then s is therefore a split, not the session tree.

Sessions persist across reboots (resurrect + continuum). Terminals auto-start tmux; NO_TMUX=1 <terminal> opens a bare shell instead.


foot (terminal)

Only colours are themed; these are foot's default key bindings.

Shortcut Action
Ctrl+Shift+c / Ctrl+Shift+v Copy / paste (clipboard)
Shift+Insert Paste primary selection
Ctrl+Shift+r Search scrollback
Ctrl++ / Ctrl+- / Ctrl+0 Font larger / smaller / reset
Ctrl+Shift+u URL mode (jump to/open links)
Ctrl+Shift+n Spawn a new terminal
Shift+PageUp / Shift+PageDown Scroll back / forward

Neovim

Leader is Space. Ctrl+h/j/k/l is shared with tmux (see above): it moves across vim splits and tmux panes seamlessly. Everything else is stock vim, plus:

Shortcut Action
,``, Toggle the file tree (nvim-tree) — comma pressed twice
Ctrl+h/j/k/l Move between vim splits / tmux panes (vim-tmux-navigator)
<leader>ff Find files (telescope)
<leader>fg Live grep (telescope)
<leader>fb Switch buffer (telescope)
<leader>xx Diagnostics list (trouble)
gc / gcc Toggle comment (selection / line)
gd Go to definition (LSP)
gr List references (LSP)
K Hover documentation (LSP)
<leader>rn Rename symbol (LSP; <leader> is Space)
<leader>ca Code action (LSP)

Completion menu (nvim-cmp)

Active only while the completion popup is open (it appears as you type, e.g. file paths):

Shortcut Action
Tab / Shift+Tab Select next / previous item
Ctrl+n / Ctrl+p Select next / previous item
Ctrl+Space Open the completion menu
Enter Confirm the highlighted item (no auto-select; otherwise a newline)
Ctrl+e Dismiss the menu

LSP covers Nix, Lua, Python and Terraform (the work box adds C# and Helm). Files are formatted on save (conform-nvim). :Git opens fugitive; gitsigns shows gutter signs. which-key pops up after <leader> to show the rest.


zsh

Shortcut Action
/ History substring search — type a fragment first, then the arrows cycle matching past commands

Bound for both CSI and SS3 cursor sequences, so it works in foot, iTerm2 and the Linux TTY alike.