# `broot-sessionizer` A replacement for [`tmux-sessionizer`](https://github.com/theprimeagen/tmux-sessionizer) that uses the broot instead of fzf, and runs in the minibuffer. For those unfamiliar, here is the basic sessionizer workflow: - You have one tmux session for every project that you're working on. - The script presents you with a menu to select one of your projects from - If a tmux session for that project already exists, switch to it - Otherwise, create the session and switch to it Differences from tmux-sessionizer: - lets you pick any directory in the filesystem, instead of from a set list of projects. - sets @default-path in the session to the path the user selects (useful for scripting) ## Setup If you haven't already, clone this repo to a know location, such as `~/.config/tmux/m`. ```sh cd ~/.config/tmux git clone https://bluedragon1221/tmux-minibuffer m ``` Next, on the line that says `external =` in `broot_cfg.sh`, replace `~/.config/tmux/sessionizer.sh` with the correct path to `sessionizer.sh`. Now we can add our keybinding to launch it: ```sh bind-key -n C-f run-shell "~/.config/tmux/m/minibuffer.sh -d '$HOME' '~/.config/tmux/m/broot-sessionizer/launch.sh'" ``` Optionally, you can create a binding to the menu instead: ```sh bind-key -n C-p run-shell "~/.config/tmux/m/broot-sessionizer/menu.sh" ``` The menu has the shortcut `p` to open the sessionizer, along with shortcuts for opening active sessions.