{"id":51471553,"url":"https://github.com/pgilad/tmux-resurrect","last_synced_at":"2026-07-06T18:01:38.143Z","repository":{"id":345934097,"uuid":"1187905155","full_name":"pgilad/tmux-resurrect","owner":"pgilad","description":"Persists tmux environment across system restarts.","archived":false,"fork":false,"pushed_at":"2026-06-02T06:26:23.000Z","size":629,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T08:19:17.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"tmux-plugins/tmux-resurrect","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgilad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-21T10:51:15.000Z","updated_at":"2026-06-02T06:26:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pgilad/tmux-resurrect","commit_stats":null,"previous_names":["pgilad/tmux-resurrect"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/pgilad/tmux-resurrect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Ftmux-resurrect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Ftmux-resurrect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Ftmux-resurrect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Ftmux-resurrect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgilad","download_url":"https://codeload.github.com/pgilad/tmux-resurrect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgilad%2Ftmux-resurrect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35201088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-06T18:01:34.237Z","updated_at":"2026-07-06T18:01:37.942Z","avatar_url":"https://github.com/pgilad.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tmux Resurrect\n\nRestore `tmux` environment after system restart.\n\n## Why use this fork instead of the original?\n\nThis project is based on the original [tmux-plugins/tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect), with a modernized save/restore implementation focused on reliability, performance, and XDG-friendly defaults.\n\nMain differences:\n\n- **Versioned v2 save format** — saves use NDJSON (`.jsonl`) instead of the original text format, making them self-describing and easier to validate.\n- **XDG-friendly save location** — saves are stored in `~/.local/share/tmux/resurrect/` by default, while still supporting an existing `~/.tmux/resurrect/` directory for compatibility.\n- **Faster saves** — pane process data is captured with a single `ps` snapshot instead of heavier per-pane lookups.\n- **Safer serialization** — tmux fields are captured and JSON-escaped in a way that preserves tabs, newlines, quotes, and paths.\n- **No visual save overhead** — saves run quietly without spinner/progress UI.\n- **Deduplication** — unchanged environments do not create duplicate backup files.\n- **Better frequent autosave support** — the lighter save path works well with shorter `tmux-continuum` intervals.\n\n\nTmux is great, except when you have to restart the computer. You lose all the\nrunning programs, working directories, pane layouts etc.\nThere are helpful management tools out there, but they require initial\nconfiguration and continuous updates as your workflow evolves or you start new\nprojects.\n\n`tmux-resurrect` saves all the little details from your tmux environment so it\ncan be completely restored after a system restart (or when you feel like it).\nNo configuration is required. You should feel like you never quit tmux.\n\nIt even (optionally)\n[restores vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)!\n\nAutomatic restoring and continuous saving of tmux env is also possible with\n[tmux-continuum](https://github.com/pgilad/tmux-continuum) plugin.\n\n### Screencast\n\n[![screencast screenshot](/video/screencast_img.png)](https://vimeo.com/104763018)\n\n### Key bindings\n\n- `prefix + Ctrl-s` - save\n- `prefix + Ctrl-r` - restore\n\n### About\n\nThis plugin goes to great lengths to save and restore all the details from your\n`tmux` environment. Here's what's been taken care of:\n\n- all sessions, windows, panes and their order\n- current working directory for each pane\n- **exact pane layouts** within windows (even when zoomed)\n- active and alternative session\n- active and alternative window for each session\n- windows with focus\n- active pane for each window\n- pane titles\n- \"grouped sessions\" (useful feature when using tmux with multiple monitors)\n- programs running within a pane! More details in the\n  [restoring programs doc](docs/restoring_programs.md).\n\nOptional:\n\n- [restoring vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)\n- [restoring a previously saved environment](docs/restoring_previously_saved_environment.md)\n\nRequirements / dependencies: `tmux 3.2` or higher, `bash`.\n\nTested and working on Linux and macOS.\n\n`tmux-resurrect` is idempotent! It will not try to restore panes or windows that\nalready exist.\nThe single exception to this is when tmux is started with only 1 pane in order\nto restore previous tmux env. Only in this case will the default session be\nreplaced.\n\n### Installation with [tpm-rs](https://github.com/pgilad/tpm-rs) (recommended)\n\nAdd and install the plugin:\n\n```bash\ntpm add pgilad/tmux-resurrect\n```\n\nMake sure your `tmux.conf` loads tpm-rs:\n\n```tmux\nrun-shell \"tpm load\"\n```\n\n### Manual Installation\n\nClone the repo:\n\n    $ git clone https://github.com/tmux-plugins/tmux-resurrect ~/clone/path\n\nAdd this line to the bottom of `.tmux.conf`:\n\n    run-shell ~/clone/path/resurrect.tmux\n\nReload tmux environment with: `$ tmux source-file ~/.tmux.conf`.\nYou should now be able to use the plugin.\n\n### Docs\n\n- [Guide for migrating from tmuxinator](docs/migrating_from_tmuxinator.md)\n\n**Configuration**\n\n- [Changing the default key bindings](docs/custom_key_bindings.md).\n- [Setting up hooks on save \u0026 restore](docs/hooks.md).\n- Only a conservative list of programs is restored by default:\n\t  `vi vim view nvim emacs man less more tail top htop irssi weechat mutt`.\n\t  [Restoring programs doc](docs/restoring_programs.md) explains how to\n\t  customize program restoration.\n- [Change the save directory](docs/save_dir.md) where `tmux-resurrect` saves\n  tmux environment.\n\n**Optional features**\n\n- [Restoring vim and neovim sessions](docs/restoring_vim_and_neovim_sessions.md)\n  is nice if you're a vim/neovim user.\n\n### Save format\n\nSave files use NDJSON (newline-delimited JSON) with a `.jsonl` extension. The\nformat is versioned (currently v2) and self-describing. Save files are stored\nin `~/.local/share/tmux/resurrect/` by default (following XDG conventions), or\nin `~/.tmux/resurrect/` if that directory already exists from a previous\ninstallation.\n\n### Avoid mixed plugin installs\n\nMake sure all saves and restores come from the same installed copy of\n`tmux-resurrect`. This matters when using\n[tmux-continuum](https://github.com/pgilad/tmux-continuum), changing\nplugin managers, or keeping more than one plugin directory around.\n\n`tmux-resurrect` exports the script paths it loaded:\n\n    @resurrect-save-script-path\n    @resurrect-restore-script-path\n\nUse those options in custom hooks instead of hard-coding a plugin path:\n\n    set-hook -g session-closed 'run-shell \"#{@resurrect-save-script-path} quiet\"'\n    set-hook -g client-detached 'run-shell \"#{@resurrect-save-script-path} quiet\"'\n\nAvoid hooks like this:\n\n    set-hook -g client-detached 'run-shell ~/.config/tmux/plugins/tmux-resurrect/scripts/save.sh'\n\nA hard-coded path can make one `tmux-resurrect` install save old `.txt` files\nwhile another install restores the v2 `.jsonl` format. On startup this can look\nlike:\n\n    Tmux resurrect: unsupported save format (version: unknown)\n\nWhen using `tmux-continuum`, load `tmux-resurrect` before `tmux-continuum` so\ncontinuum sees the correct exported script paths. After upgrading to v2, run one\nnew save and confirm that `last` points to a `.jsonl` file:\n\n    tmux run-shell \"#{@resurrect-save-script-path} quiet\"\n    readlink ~/.local/share/tmux/resurrect/last\n\n### Save performance\n\nThe v2 save process is designed to be fast and lightweight:\n\n- **Single process snapshot** — one `ps` call captures pane child processes\n  upfront, replacing the old per-pane strategy lookups (pgrep, /proc, gdb).\n- **Safe tmux field capture** — pane fields are read from tmux in a way that\n  preserves user-controlled tabs, newlines, quotes, and paths before JSON\n  escaping.\n- **No visual overhead** — no spinner or progress display; the save completes in\n  under a second on typical setups and is imperceptible.\n- **Deduplication** — if the environment hasn't changed since the last save, the\n  duplicate file is discarded and no new backup is written.\n\nThese improvements make frequent saves practical. If you use\n[tmux-continuum](https://github.com/pgilad/tmux-continuum) for automatic\nsaving, a shorter interval such as 5 minutes works well:\n\n    set -g @continuum-save-interval '5'\n\nThe previous default of 15 minutes was chosen when saving was heavier; with v2\nthere is no performance reason to keep it that long.\n\n### Other goodies\n\n- [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) - a plugin for\n  regex searches in tmux and fast match selection\n- [tmux-yank](https://github.com/tmux-plugins/tmux-yank) - enables copying\n  highlighted text to system clipboard\n- [tmux-open](https://github.com/tmux-plugins/tmux-open) - a plugin for quickly\n  opening highlighted file or a url\n- [tmux-continuum](https://github.com/pgilad/tmux-continuum) - automatic\n  restoring and continuous saving of tmux env\n\n### Reporting bugs and contributing\n\nBoth contributing and bug reports are welcome. Please check out\n[contributing guidelines](CONTRIBUTING.md).\n\n### Credits\n\n[Mislav Marohnić](https://github.com/mislav) - the idea for the plugin came from his\n[tmux-session script](https://github.com/mislav/dotfiles/blob/2036b5e03fb430bbcbc340689d63328abaa28876/bin/tmux-session).\n\nThis project is based on the original\n[tmux-plugins/tmux-resurrect](https://github.com/tmux-plugins/tmux-resurrect).\n\n### License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Ftmux-resurrect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgilad%2Ftmux-resurrect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgilad%2Ftmux-resurrect/lists"}