Skip to content

tmux: resumable sessions that survive reboots - #7

Merged
mathjoha merged 2 commits into
mainfrom
tmux
Oct 4, 2026
Merged

mathjoha merged 2 commits into
mainfrom
tmux

Conversation

@mathjoha

@mathjoha mathjoha commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

tmux sessions now survive reboots with zero manual steps: window/pane layout, working directories, visible pane contents, Neovim sessions, and shell command history all restore automatically.

  • Plugins via TPM: .tmux.conf declares tpm, tmux-resurrect, and tmux-continuum — autosave every 15 min, auto-restore on server start, pane contents captured, nvim restored via the session strategy. TPM init stays the last line of the conf.
  • scripts/tmux.sh (new, modeled on scripts/starship.sh, sourceable or standalone): clones TPM, installs plugins headlessly (no prefix+I needed), and wires persistent shell history into ~/.bashrc (histappend + history -a each prompt) or ~/.zshrc (INC_APPEND_HISTORY) depending on $SHELL — tmux-resurrect removed history saving upstream, so rc wiring provides up-arrow recall in restored panes instead.
  • Neovim: new lua/config/autocmds.lua writes Session.vim on VimLeavePre, only when inside tmux.
  • Git: new repo-tracked git/gitignore_global (symlinked to ~/.gitignore_global, wired via core.excludesfile) keeps Session.vim out of git status everywhere.
  • CI: bumps pozil/auto-assign-issue v1 → v2; the v1 tag predates pull_request support and failed on every PR opened.
  • README gains a "Session persistence" section and fixes the stale "mouse on" claim.

Test plan

Verified by the test harness's Docker suite on ubuntu 24.04 and debian bookworm — 35/35 assertions green per distro, including a new tmux-persistence run: TPM + plugin dirs present after setup.sh, server boots with the config, @continuum-restore live, an actual resurrect save-file write, bash and zsh history wiring, global gitignore effective, and idempotent re-runs (no duplicate rc blocks, no symlink conflicts).

🤖 Generated with Claude Code

mathjoha and others added 2 commits October 4, 2026 13:59
- scripts/tmux.sh: dual-mode helper (sourced by setup.sh or standalone)
  that clones TPM, installs plugins headlessly, and wires persistent
  shell history into ~/.bashrc or ~/.zshrc (resurrect dropped history
  saving upstream, so the rc wiring provides up-arrow recall instead)
- .tmux.conf: tpm + tmux-resurrect + tmux-continuum; autosave every
  15 min, auto-restore on server start, pane contents captured, nvim
  restored via the 'session' strategy
- nvim: VimLeavePre autocmd writes Session.vim when inside tmux
- git: global gitignore (core.excludesfile) keeps Session.vim out of
  git status everywhere

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The v1 tag resolves to a release that only accepts repo-token and
assignees and predates pull_request support, so the workflow failed
on every PR opened.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mathjoha
mathjoha merged commit 0af20b3 into main Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant