#tmux #git #windows #session #fuzzy-find

app tmux-sessionizer

Tmux Sessionizer is a cli tool to fuzzy find all git repositories in a list of specified folders and open them as a new tmux session. Also, for git worktrees, this tool opens all checked out worktrees as new windows.

3 unstable releases

0.2.0 Nov 5, 2022
0.1.1 May 24, 2022
0.1.0 May 5, 2022

#1270 in Command line utilities

Download history 11/week @ 2022-11-28 11/week @ 2022-12-05 38/week @ 2022-12-12 38/week @ 2022-12-19 19/week @ 2022-12-26 16/week @ 2023-01-02 19/week @ 2023-01-09 19/week @ 2023-01-16 29/week @ 2023-01-23 26/week @ 2023-01-30 31/week @ 2023-02-06 28/week @ 2023-02-13 21/week @ 2023-02-20 12/week @ 2023-02-27 15/week @ 2023-03-06 39/week @ 2023-03-13

88 downloads per month

MIT license

565 lines

tmux-sessionizer (tms)

The fastest way to manage projects as tmux sessions

What is tmux-sessionizer?

Tmux Sessionizer is a tmux session manager that is based on ThePrimeagen's tmux-sessionizer but is opinionated and personalized to my specific tmux workflow. And it's awesome. Git worktrees are automatically opened as new windows, specific directories can be excluded, a default session can be set, killing a session jumps you to a default, and it is a goal to handle more edge case scenarios.

Tmux has keybindings built-in to allow you to switch between sessions. By default these are leader-( and leader-)

Switching between windows is done by default with leader-p and leader-n



Running tms will find the repos and fuzzy find on them

Use tms --help

    tms [SUBCOMMAND]

    -h, --help       Print help information
    -V, --version    Print version information

    config      Configure the defaults for search paths and excluded directories
    help        Print this message or the help of the given subcommand(s)
    kill        Kill the current tmux session and jump to another
    sessions    Show running tmux sessions with asterisk on the current session

Configuring defaults

    tms config [OPTIONS]

        --excluded <excluded dirs>...
            As many directory names as desired to not be searched over

        --full-path <display full path>
            Use the full path when displaying directories [posible values: true, false]

    -h, --help
            Print help information

    -p, --paths <search paths>...
            The paths to search through. Paths must be full paths (no support for ~)

        --remove <remove dir>...
            As many directory names to be removed from the exclusion list

    -s, --session <default session>
            The default session to switch to (if avaliable) when killing another session



Install with cargo install tmux-sessionizer or

From source

Clone the repository and install using cargo install --path . --force

Usage Notes

The 'tms sessions' command can be used to get a styled output of the active sessions with an asterisk on the current session. The configuration would look something like this

set -g status-right " #(tms sessions)"

E.g. tmux status bar If this configuration is used it can be helpful to rebind the default tmux keys for switching sessions so that the status bar is refreshed on every session switch. This can be configured with settings like this.

bind -r '(' switch-client -p\; refresh-client -S
bind -r ')' switch-client -n\; refresh-client -S


~493K SLoC