fmux is a tmux session manager entirely written in and for fish. It is heavily inspired by and somewhat compatible with ThePrimeagen's tmux-sessionizer and tm
These paths have not yet faced the trials of combat. Dragons await those who dare venture forward with reckless abandon.
Using Fisher:
fisher install Traxmaxx/fmux
The fmux_fm
command helps you find and manage tmux sessions:
fmux_fm [directory]
- When run without arguments, it displays a fuzzy finder with available directories from your configured search paths
- When provided with a directory path, it creates or attaches to a tmux session for that directory
- If already inside a tmux session, it will switch to the selected session
- If not in tmux, it will create a new session or attach to an existing one
The fmux_fmk
command allows you to kill tmux sessions:
fmux_fmk
- Shows a fuzzy finder with all current tmux sessions
- Select a session to kill it
- You can select multiple sessions to kill by using tab
fmux is compatible with .tmux-sessionizer
project files. If your project directory contains a .tmux-sessionizer
file, fmux will use its contents to:
- Set a custom session name
- Define a specific window/pane layout
- Run commands on session startup
- Configure project-specific settings
This provides a convenient way to automatically set up your development environment consistently each time you open a project.
You can customize search directories for the -f
option:
set -g search_dirs "$HOME/dev" "$HOME/projects" "$HOME/work"
and I prefer to use shorter aliases:
# Create function aliases to allow direct use of fmux as fm and fmk commands
alias fm='fmux_fm'
alias fmk='fmux_fmk'
MIT