Repository navigation
Description
Summary
nix/home/multiplexer.nix:67 sets detach-on-destroy off. For a consumer that
runs one terminal window per project — each window launching its own
attach/picker — killing a session does not end that window. tmux switches the
orphaned client to the most recently active remaining session, which already has
a window of its own. The result is two windows showing one project, and the
window that was meant to close stays open.
Reproduce
- Enable
vigos.multiplexer; open three sessions, each attached from its own
terminal window (so no session is left detached). prefix + X(the module's own kill-session binding, [FEATURE] vigos.multiplexer: keybindings and terminal defaults for the org tmux config #1605) in one of them,
confirm.- The session dies, but its window reappears attached to one of the other two
projects — now displayed twice. Expected: that window closes.
Why off is the wrong value, not just an unlucky one
no-detached differs from off in exactly one case, and it is the broken one:
| Remaining sessions | off |
no-detached |
|---|---|---|
| some sitting detached | switch to it | switch to it — identical |
| all already attached elsewhere | re-attach onto a session already on screen | detach, the window closes |
| none | detach | detach — identical |
Everything the current comment claims for off ("switches to another live
session instead of dropping to a bare shell; the client still detaches if it was
the last one") stays true under no-detached. Only the duplicate-attach case
changes.
It is also inconsistent with the line right below it: set-titles is justified
in the same comment block as making "several terminal windows distinguishable
by project" — i.e. the module already assumes the multi-window, multi-client
workflow that is precisely where off misbehaves.
Proposed fix
- set -g detach-on-destroy off
+ set -g detach-on-destroy no-detachedSingle-host/single-client consumers (a devcontainer, an SSH'd guest with one
attached client and other sessions detached) see no change at all.
The comment above it wants a small edit too, since the behaviour is now
conditional: switch to a detached session if one exists, otherwise detach.
Workaround
Re-set the option after the module's block from the consumer's own
extraConfig, ordered later. The override can be dropped once this lands.
Activity
fix: sync watermark, stacked-PR CI, prepare-time bundle, App-ID fallb…
c-vigo commentedon Sep 30, 2026
Fixed on
devby #1792 (964a49d):detach-on-destroy no-detached. The consumer-sideextraConfigoverride can be dropped once this release is adopted.chore: release 1.18.0 (#1819)