This script simplifies the management of tmux sessions or WezTerm windows by providing an interactive interface to create or switch between sessions. If a session doesn’t exist for a selected directory, it creates a new tmux session or a new WezTerm tab with the selected directory as the working directory.
Run the script without any arguments to interactively select a directory using fzf
or sk
. Alternatively, you can provide a directory path as an argument to quickly switch to or create a tmux session or WezTerm tab for that directory.
./sessionizer [directory]
fd
and fzf
to interactively select a directory.Interactively select a directory using fzf
or sk
:
./sessionizer
Quickly switch to or create a session for a specific directory:
./sessionizer ~/projects/my_project
The script checks whether tmux or WezTerm is already running or if there is an existing tmux session or WezTerm tab for the selected directory. If not, it creates a new session; otherwise, it switches to the existing session.