2.7 KiB
Migrating from tmuxinator
Why migrate to tmux-resurrect
?
Here are some reasons why you'd want to migrate from tmuxinator
to
tmux-resurrect
:
-
Less dependencies
tmuxinator
depends onruby
which can be a hassle to set up if you're not a rubyist.
tmux-resurrect
depends just onbash
which is virtually omnipresent. -
Simplicity
tmuxinator
has an executable, CLI interface with half dozen commands and command completion.
tmux-resurrect
defines just 2 key bindings. -
No configuration
tmuxinator
is all about config files (and their constant updating).
tmux-resurrect
requires no configuration to work. -
Better change handling
When you make a change to any aspect of tmux layout, you also have to update relatedtmuxinator
project file (and test to make sure change is ok).
Withtmux-resurrect
there's nothing to do: your change will be remembered on the next save.
How to migrate?
- Install
tmux-resurrect
. - Open *all* existing
tmuxinator
projects.
Verify all projects are open by pressingprefix + s
and checking they are all on the list. - Perform a
tmux-resurrect
save.
That's it! You can continue using just tmux-resurrect
should you choose so.
Note: it probably makes no sense to use both tools at the same time as they do the same thing (creating tmux environment for you to work in). Technically however, there should be no issues.
Usage differences
tmuxinator
focuses on managing individual tmux sessions (projects).
tmux-resurrect
keeps track of the *whole* tmux environment: all sessions are
saved and restored together.
A couple tips if you decide to switch to tmux-resurrect
:
-
Keep all tmux sessions (projects) running all the time.
If you want to work on an existing project, you should be able to just *switch* to an already open session usingprefix + s
.
This is different fromtmuxinator
where you'd usually runmux new [project]
in order to start working on something. -
No need to kill sessions with
tmux kill-session
(unless you really don't want to work on it ever).
It's the recurring theme by now: just keep all the sessions running all the time. This is convenient and also cheap in terms of resources. -
The only 2 situations when you need
tmux-resurrect
:- Save tmux environment just before restarting/shutting down your
computer.
- Restore tmux env after you turn the computer on.
- Save tmux environment just before restarting/shutting down your
computer.
Other questions?
Still have questions? Feel free to open an issue. We'll try to answer it and also update this doc.