aboutsummaryrefslogtreecommitdiff
path: root/broot-sessionizer/README.md
blob: 48781a1d9a838b0ea49b02a653535356889718e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# `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.

<a href="https://asciinema.org/a/2qp4RkHfbNzNHm3BQsWUrrTy9" target="_blank"><img src="https://asciinema.org/a/2qp4RkHfbNzNHm3BQsWUrrTy9.svg" /></a>

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 "${scriptsDir}/minibuffer.sh -d '$HOME' '~/.config/tmux/m/broot-sessionizer/launch.sh'"
```