Create dynamic shortcuts for your tmux sessions!
sh
cargo install muxi
```sh ❯ muxi Create bookmarks for your tmux sessions on the fly! 🚀
Usage: muxi
Commands: init Register within Tmux and add bindings config See and edit your settings sessions See and manage your muxi sessions completions Generate completions for your shell fzf Spawn a FZF popup to manage your muxi sessions help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help -V, --version Print version ```
You can provide a settings.toml
in one of the following locations:
$MUXI_CONFIG_PATH
$XDG_CONFIG_HOME/muxi/
~/.config/muxi/
Or run muxi config edit
to open it in your favorite $EDITOR
```toml
tmux_prefix = true
<prefix>g
muxi_prefix = "g"
uppercase_overrides = false
[bindings]
e = { popup = { title = " sessions " }, command = "muxi sessions edit -- +ZenMode" }
c = { popup = { title = " config " }, command = "muxi config edit" }
s = { popup = { title = " muxi " }, command = "muxi sessions switch --interactive" }
f = { command = "muxi fzf" }
t = { command = "muxi sessions switch --tmux-menu" }
tmux run-shell "tmux switch-client -l"
M-Space = { command = "tmux switch-client -l" }
[bindings.g] command = "tmux send htop Enter"
[bindings.l]
popup = { width = "75%", height = "60%" } command = "muxi sessions | less" ```
And start muxi
in your tmux.conf
:
tmux
if "type muxi" {
run -b "muxi init"
}
You can alternatively define settings entirely from your tmux config:
```tmux
set -g @muxi-use-tmux-prefix 'on' # on|off
set -g @muxi-prefix 'g' # Any valid tmux key, like M-Space
set -g @muxi-uppercase-overrides 'off' # on|off
if "type muxi" {
# If you're going to define bindings on the muxi table, don't use -b
run "muxi init"
}
bind -T muxi e popup -w 76% -h 75% -b rounded -T " sessions " -E "muxi sessions edit -- +ZenMode -c 'nmap
bind 'f' run 'muxi sessions switch --tmux-menu' ```
Running muxi sessions edit
will open your sessions.toml
file, which should look something like the following:
```toml
d = { name = "dotfiles", path = "~/.dotfiles" } m = { name = "muxi", path = "~/Sites/rust/muxi/" } n = { name = "notes", path = "~/Library/Mobile Documents/com~apple~CloudDocs/notes" } ```
This is the file that muxi
will use to generate your session bindings and keep state. After exiting your editor, muxi
will resync the sessions (same with your configuration!)