tmux-tea is a tmux session manager aimed at simplifying and speeding up how you interact with tmux sessions. It's a one key solution to all your tmux session needs.
- Fuzzy Search: Integrations with fzf for intuitive session selection
- Smart Session Management: Integrations with tmuxinator for session specific configs
- Session Previews: Visual previews of existing sessions and directory contents
- Zoxide Integration: Directory-based session creation with smart directory jumping
- Multiple Session Support: Open multiple sessions at once by passing multiple arguments
- tmux, fd, fzf, zoxide (required)
- tmuxinator (for session layouts)
- eza (for directory previews)
Add the following to your ~/.tmux.conf
set -g @plugin '2kabhishek/tmux-tea'
cd ~/.tmux/plugins/tmux-tea # replace ~/.tmux/plugins with your plugin installation path
ln -sfnv $PWD/bin/tea.sh ~/.local/bin/tea # Add tea to $PATH, make sure ~/.local/bin is in your $PATH
# Get help
tea --help
# Interactive mode with fzf
tea
# Single session
tea ~/Projects/myapp
# Multiple sessions
tea work personal ~/Projects/app1 ~/Projects/app2
# Mix paths and zoxide queries
tea ~/code/frontend backend-service ~/docs
<prefix> + t
- Open tea (configurable with@tea-bind
)- Ctrl+t - Alternate binding (configurable with
@tea-alt-bind
, set to"false"
to disable)
- Ctrl+f - Directory mode (find directories)
- Ctrl+j - Zoxide mode (recent directories)
- Ctrl+s - Session mode (existing sessions)
- Ctrl+w - Window mode (existing windows)
- Ctrl+x - Kill mode (delete sessions)
- Ctrl+t - Toggle tea / exit
All configuration options have sensible defaults and can be customized via tmux options.
If you have a .tmuxinator.yml
file in your directory, tea will use it for setting up your session.
If you have a tmuxinator config file in ~/.config/tmuxinator/
that has the same name as your tmux session directory then that will be used.
If none of these are present a tmux session is created from scratch.
If there is no tmuxinator config present, you can set a default command to run in the session using:
set -g @tea-default-command "$EDITOR"
This will open every new session after the initial one with your "$EDITOR" command running.
If you use zsh you can add the <C-t>
binding outside tmux as well using this sni[[ed]]
bindkey -s '^T' ' tea^M ^M'
You can set tea-show-nth
option to show parts of the path, default is to show the last two dirs.
# shows the second last (-2) and the last (-1) directories
set -g @tea-show-nth "-2,-1"
# if you want to show the last three directories
set -g @tea-show-nth "-3,-2,-1"
You can set the session name to be the full path you select instead of the directory using:
set -g @tea-session-name "full-path"
You can set the preview position to "top","bottom","left", or "right", default is "top".
set -g @tea-preview-position "bottom"
You can set the input position to "default", "reverse" or "reverse-list", default is "reverse".
set -g @tea-layout "reverse"
Set the default directory used by the find mode, first fallback is $HOME/Projects
, second fallback is $HOME
.
set -g @tea-find-path "$HOME/Projects"
# You can also set it to the parent directory of PWD
set -g @tea-find-path "$PWD/.."
Set the max depth used by the find mode, default depth is "2".
set -g @tea-max-depth "3"
tmux-tea was inspired by t-smart-tmux-session-manager and shares a lot of code.
I wanted to add some more features that diverged from the original repo and wanted to keep the configs simpler.
- Figuring out the preview script was quite tricky.
- Bash shenanigans!
- dots2k β Dev Environment
- nvim2k β Personalized Editor
- sway2k β Desktop Environment
- qute2k β Personalized Browser
- tmux-tilit β Turns tmux into a terminal window manager
- tmux2k β Makes your tmux statusbar pretty!
β hit the star button if you found this useful β
Source | Blog | Twitter | LinkedIn | More Links | Other Projects