4 ms·
I used to use tools like that (tummy, teamocil, etc) but I've since discovered tmux-resurrect. It persists tmux sessions, windows, panes, and a whitelist of non
by positr0n 10y ago
I used to use tools like that (tummy, teamocil, etc) but I've since discovered tmux-resurrect. It persists tmux sessions, windows, panes, and a whitelist of non-destructive commands like vim and top across reboots. Now my tmux sessions just organically grow and shrink as necessary and I never worry about having to recreate them.
Of course I can see the case for combining both tools. If you have a lot of projects, and/or want REPLs loaded you might not want them sitting around in memory for months if you're not going to use them.
It is trivial to get working. Just use tmux plugin manager to install tmux-resurrect and tmux-continuum.
https://github.com/tmux-plugins/tpm https://github.com/tmux-plugins/tpm
Example usage in my dotfiles: https://github.com/positron/dotfiles/blob/master/.tmux.conf#L72-L99 https://github.com/positron/dotfiles/blob/master/.tmux.conf#...
- minhajuddin 10y agoI've tried tmux resurrect. Wasn't for me. With a predefined script I can close and open many windows with abandon. Also, creating the initial script is simple enough. I guess different strokes for different folks :)
- nnutter 10y agoDoes it save environment variables too?
- funksta 10y agoI don't believe it does save env vars. However, as an owner of a crashy 2010 MBP, tmux-resurrect saves my bacon several times a week. I very highly recommend it.
- minhajuddin 10y agoIt doesn't save anything, it is just a startup script to get your tmux session set up the way you want. You can however, have env vars in the script or source from a particular file. e.g. session "grnc_hub" directory "/home/minhajuddin/a/grnc_hub" window "server", [ pane("RAILS_ENV=production rails s"), pane("source ./.env && rails s"), ] ...
- toddnni 10y agoNo, but add an autoenv script of your choice, like zsh-autoenv and the combination is nearly perfect.