3 ms·
I'll be proving the point that tmux is a batteries-not-included program with my solution to your "resurrect", but it's probably fine for (and unsurprising to) a
by pkghost 5y ago
I'll be proving the point that tmux is a batteries-not-included program with my solution to your "resurrect", but it's probably fine for (and unsurprising to) anyone who doesn't mind writing a few lines of bash:
I have a bash script by the name of .tmux inside of every workspace folder. Its contents are typically a single multiline tmux command that creates a new tmux session with all the screens and processes relevant to the project (usually: emacs, shell for git, ssh to staging + prod, prompts in various databases, and several entr-driven screens for automatically running migrations, tests, etc).
Separately, I have a shell function that runs every time I change directories that checks for the existence of said file, and then either runs the file, attaches to the existing tmux session associated with the folder, or does nothing (in the case that the shell is already in a tmux session).
In short, I setup my workspace once per project.