Terminal Workspace Cheat Sheet
Run shell scripts, manage jobs, switch windows and keep playing with keyboard controls.
Terminal Workspace Cheat Sheet
Use a terminal to program helpers while you play Backspin, Hairpin or Safe Harbor. Your controls and your programs act together on the same game. Giving the keyboard to another window does not stop your helpers.
Windows
Press Ctrl+B, release it, then press the next key. This follows tmux's prefix pattern and leaves browser shortcuts such as Ctrl+T and Ctrl+W alone. Apple keyboards also accept Cmd+B as the prefix.
| After Ctrl+B | Action |
|---|---|
F | Expand the game inside the browser, or restore your panel layout |
G | Focus the game |
T | Focus your most recent terminal or editor |
Shift+T | Open a fresh terminal |
W | Find a window by name, including minimized windows; ↑/↓ select, Enter focuses |
, | Rename the focused window; submit an empty name to restore automatic titles |
X | Close the focused window; confirm with Y if it has jobs or unsaved edits |
M | Minimize the focused overlay and return keyboard control to the game |
Shift+M | Hide all overlays; repeat to restore the windows you hid |
Tab | Focus the next visible panel |
Shift+Tab | In expanded view, keep Shift held and tap Tab to browse windows; release Shift to focus |
H | Focus Context, including the game's controls and scripting reference |
? | Open the current shortcut reference |
These are the keys, not instructions to hold Shift for every capital letter in the table. Only the combinations labelled Shift need it.
Escape alone restores the normal layout from expanded view. An open editor keeps Escape for its own commands; use Ctrl+B F to restore panels while editing. Escape cancels a picker, rename prompt or close confirmation first.
The prefix, comma to rename, W to choose, X to close and ? for help follow tmux conventions. The game, terminal, minimize and held-Shift switcher bindings are CLI-Games extensions. They are shown in the on-screen reference rather than presented as stock tmux keys.
Automatic terminal titles show the editor filename, foreground command, or current directory when idle. Exact duplicate titles get numbers. A manual name stays until you clear it. The picker also shows modified buffers, job states and minimized windows. Its order stays steady while you choose.
Minimizing keeps the terminal, editor buffer and jobs alive. Closing ends that
terminal's jobs and discards its buffer after any required confirmation. Closing
the main terminal overlay retains your shared filesystem and command history;
T can reopen it. The game and other terminals continue. Windows persist when
you change games; game helpers belong to their original game and end with it.
If you used fg to attach another terminal's job, closing this window detaches
it; the job keeps running in its original terminal.
Opening a window from its bar only reveals it. Click inside, or use a focus shortcut, to give it the keyboard. Yellow borders identify the current owner. You can also drag window titles and resize their edges.
Execute a script
pwd
ls
nano helper.sh
chmod +x helper.sh
./helper.sh
./helper.sh executes a file in your current directory. Start executable Bash
files with #!/bin/bash. A full path such as ~/scripts/my-helper/pilot.sh
also works. Execution inherits your current directory: it does not silently
change to the script's folder. cd there yourself if the script uses relative files.
For a bare name, put its directory on PATH:
export PATH="$HOME/scripts/my-helper:$PATH"
pilot.sh
bash helper.sh explicitly reads a file with the Bash interpreter; it needs
read permission, not the executable bit. source helper.sh (or . helper.sh)
evaluates it in your current shell, so its directory and variable changes remain.
Executed live helpers have their own variables, directory and control contributions.
There is no run FILE command. An old, pinned download may still mention it in
its historical README. Use the executable path above, with chmod +x if necessary.
Published releases and player-edited files are not silently rewritten.
Jobs in live games
./cruise.sh &
./auto-gears.sh &
jobs
Both helpers can share one terminal. Without &, a program stays in the
foreground until it finishes or you suspend it. Output appears as it is produced.
Background output still goes to its terminal; redirect it when you want a quiet prompt:
./helper.sh > helper.log 2>&1 &
| Command or key | Effect |
|---|---|
| Ctrl+C | Stop the foreground job and its children |
| Ctrl+Z | Suspend the foreground job and release its game controls temporarily |
bg | Resume the current job in the background |
fg %2 | Bring job 2 to this terminal's foreground |
jobs | Show jobs and their states |
kill %2 | Stop job 2 and its children |
wait | Wait for jobs; inside a script, wait for its children |
logs %2 | CLI-Games: inspect retained job output |
stop | CLI-Games: stop all helpers for the current game |
Use the job number actually printed in your terminal. Saving a script changes the next execution, not the copy already running. Stop and restart it to use edits.
In live games, delay 500 waits 500 milliseconds of simulation time and sleep 0.5
waits half a second. Pausing the game freezes that clock. delay is a game API;
wait retains its shell job meaning. Separate deterministic benchmark modes
have their own documented control protocol.
Editors and collaboration
Nano: Ctrl+O, Enter saves; Ctrl+X exits. Vim: Esc, then :wq saves and
exits; :q! discards changes. Window shortcuts can return you to the game while
the editor stays open.
Read a helper before executing it. Make a branch, edit, and review your saved changes before committing:
git switch -c tune-helper
git diff
git add helper.sh
git diff --cached
git commit -m "Explain why this helper changed"
Try the Backspin auto-plunger walkthrough or
Hairpin automatic-gears walkthrough for a complete
example, including contributor setup. Open this reference from the terminal with
wiki terminal-workspace-cheat-sheet. Site pages open in a new tab, preserving
your terminal and game. If your browser blocks the tab, follow the printed link.