feat(shell): write tmux defaults to /etc/tmux.conf #35

Merged
claudiomaradonna merged 1 commit from feat/shell-tmux-defaults into main 2026-10-08 12:54:48 +02:00
Collaborator

Why

With shell_tmux_autostart on, the shell role attaches a tmux that runs on tmux's own defaults. The mouse is off, so Ghostty turns the wheel into arrow keys and the shell walks its command history instead of scrolling, and each pane keeps only 2000 lines.

What changed

Wherever shell_tmux_autostart is on, the role writes /etc/tmux.conf with the mouse on and 50000 lines of history, keeping a backup of any file the host had. tmux reads each user's ~/.tmux.conf after it, so vi keys and set-clipboard on stay personal choices; tmux's default set-clipboard external already sends a mouse selection to the terminal's clipboard. Sessions already running keep their options until the server restarts or runs tmux source-file /etc/tmux.conf, as the role README now says. Turning the switch off leaves the file in place, as it leaves the package.

The shell scenario plants a host /etc/tmux.conf, checks that it is replaced with a backup beside it, and starts a tmux server with no -f to prove it finds the defaults on its own.

Verification

  • make check: passed (ansible-lint production profile with 0 failures, and every gate that needs no podman).
  • tmux 3.6 from Ubuntu's package, extracted outside the repository: the rendered file loads as mouse on and history-limit 50000 (tmux's defaults: mouse off, 2000, set-clipboard external, with xterm* carrying the clipboard feature), and the binary reads /etc/tmux.conf first.
  • Not run: make test and make verify, since the authoring sandbox has no podman. The scenario's start-server ; show-options form is checked on tmux 3.6 only, while the scenario image carries Debian 12's 3.3a.

Risks and follow-ups

The change reaches every host with autostart on, in the home and hive tenants, and touches only /etc/tmux.conf, so it cannot lock anyone out. Still owed: make test, and a check from Ghostty on a converged host that the wheel scrolls and a mouse selection pastes locally.

## Why With `shell_tmux_autostart` on, the shell role attaches a tmux that runs on tmux's own defaults. The mouse is off, so Ghostty turns the wheel into arrow keys and the shell walks its command history instead of scrolling, and each pane keeps only 2000 lines. ## What changed Wherever `shell_tmux_autostart` is on, the role writes `/etc/tmux.conf` with the mouse on and 50000 lines of history, keeping a backup of any file the host had. tmux reads each user's `~/.tmux.conf` after it, so vi keys and `set-clipboard on` stay personal choices; tmux's default `set-clipboard external` already sends a mouse selection to the terminal's clipboard. Sessions already running keep their options until the server restarts or runs `tmux source-file /etc/tmux.conf`, as the role README now says. Turning the switch off leaves the file in place, as it leaves the package. The shell scenario plants a host `/etc/tmux.conf`, checks that it is replaced with a backup beside it, and starts a tmux server with no `-f` to prove it finds the defaults on its own. ## Verification - `make check`: passed (ansible-lint production profile with 0 failures, and every gate that needs no podman). - tmux 3.6 from Ubuntu's package, extracted outside the repository: the rendered file loads as `mouse on` and `history-limit 50000` (tmux's defaults: `mouse off`, `2000`, `set-clipboard external`, with `xterm*` carrying the `clipboard` feature), and the binary reads `/etc/tmux.conf` first. - Not run: `make test` and `make verify`, since the authoring sandbox has no podman. The scenario's `start-server ; show-options` form is checked on tmux 3.6 only, while the scenario image carries Debian 12's 3.3a. ## Risks and follow-ups The change reaches every host with autostart on, in the home and hive tenants, and touches only `/etc/tmux.conf`, so it cannot lock anyone out. Still owed: `make test`, and a check from Ghostty on a converged host that the wheel scrolls and a mouse selection pastes locally.
With shell_tmux_autostart on, the role attached a tmux that ran on
tmux's own defaults: the mouse off, so the terminal turned the wheel
into arrow keys and the shell walked its command history, and 2000
lines of scrollback per pane.

The role now writes /etc/tmux.conf with the mouse on and 50000 lines
of history, keeping a backup of any file the host had. tmux reads each
user's ~/.tmux.conf after it, so vi keys and set-clipboard on stay
personal choices; tmux's default set-clipboard external already sends
a mouse selection to the terminal's clipboard. Sessions already running
keep their options until the server restarts or sources the file.

The shell scenario plants a host /etc/tmux.conf, checks that it is
replaced with a backup left beside it, and starts a tmux server with no
-f to prove it finds the defaults on its own.
claudiomaradonna deleted branch feat/shell-tmux-defaults 2026-10-08 12:54:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/castrum!35
No description provided.