Files
nixfiles/lyrathorpe/home/KEYBINDINGS.md
T
Emma Thorpe 63ca392537
CI / flake (pull_request) Successful in 2m10s
chore(flake): treefmt + deadnix/statix + pre-commit; relocate work module
- treefmt-nix drives `nix fmt` and the formatting check (nixfmt/shfmt/
  prettier; generated files and flake.lock excluded). Replaces the
  bespoke find-based check.
- deadnix and statix as flake checks and pre-commit hooks; deadnix
  ignores module-arg patterns, statix.toml disables the two house-style
  lints (repeated_keys, empty_pattern). Fixed the one real deadnix hit
  (unused overlay arg) and statix hit (use inherit for claude-code).
- git-hooks.nix installs the pre-commit gate via the devShell.
- .editorconfig for the base style.
- Move system/modules/work/default.nix -> lyrathorpe/home/work.nix (it is
  a home-manager module). README gains a Development section; docs
  reformatted by the new formatter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 15:08:10 +01:00

10 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
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

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.