# cheatsheet-keymap-path User-level, no root. ## Symptom / risk The Super+K cheatsheet is generated by `nosignal-keybinds-gen` from the keymap markdown. Its source-resolution order is: ``` $1 arg → $NOSIGNAL_KEYMAP_MD → $HOME/Downloads/NoSignal-keybindings.md → $HOME/.local/share/nosignal/NoSignal-keybindings.md ``` `~/Downloads` is checked **before** the canonical layer copy. Today that copy is absent so it falls through and works — but any stale `NoSignal-keybindings.md` left in `~/Downloads` (a common scratch location) would **silently shadow** the real keymap, so the cheatsheet would show wrong/old keys. The `nosignal-keybinds` header comment also still says the doc lives in `~/Downloads`. ## Fix - `nosignal-keybinds-gen`: drop the `~/Downloads` candidate so the canonical `~/.local/share/nosignal/NoSignal-keybindings.md` is the only implicit source. The explicit `$1` arg and `$NOSIGNAL_KEYMAP_MD` override are kept for dev use. - `nosignal-keybinds`: correct the header comment to point at the canonical path. `fix-cheatsheet-keymap-path.sh` patches the on-system scripts idempotently (awk for the candidate line + a sanity `sh -n` before saving; sed for the comment), then refreshes the cached `keybinds.list`. No-op if already fixed. ## Builder integration Make the canonical change in the layer's `nosignal-keybinds-gen` and `nosignal-keybinds` sources directly; this component is the equivalent patch for an already-installed system. ## Verify ``` grep -n 'NoSignal-keybindings.md' "$(readlink -f "$(command -v nosignal-keybinds-gen)")" # only the ~/.local/share/nosignal path should remain (no ~/Downloads) nosignal-keybinds-gen | head -3 # still generates the keymap ``` ## Files - `fix-cheatsheet-keymap-path.sh` — idempotent patcher. - `migrations/1781445600-cheatsheet-keymap-path.sh` — delegates to it.