I wanted tmux to manage my sessions for me - the result: Dux.
Dux is a wrapper for tmux which adds some nice features, including:
All your sessions live in a pool - run Dux and it will search the pool for a disconnected session to reconnect to.
No available sessions open in the pool? No problem, Dux will start a new one with a random two word name. Warning: some are accidentally hilarious (my current session is unfooled zalambdodonts
uh, what?)
Want to open a long-running session which should be left alone (e.g. daemon or vpn)? Ban them from your pool by renaming a tmux session with :rename-sesion
to something that starts with *
. Dux will ignore it when searching for disconnected sessions.
- tmux 2.X, 1.X is untested
- python 3
dux.py
- Clone repo
git clone https://github.com/csivanich/dux.git; cd dux
- Run
./dux.py
Well, kinda. You'll probably want to kick of Dux when you start your shell - that's an excersize left to the reader, though. Shameless plug alert checkout my dotfiles for an example which kicks it off on zsh's start.
- Rule-based session auto-attaching
- Better Tmux interaction (tmuxp)
- Pool groups?
- github.com/atebits/Words - Word list to run session name generation and licensed under CC0 Public Domain.
Dux is licensed under GPLv2 (c) 2022 Chris Sivanich