Create dynamic shortcuts for your tmux sessions!
sh
cargo install muxi
In your tmux configuration:
tmux
if "type muxi" {
run -b "muxi init"
}
Then provide a settings.toml
in one of the following locations:
- $MUXI_CONFIG_PATH
- $XDG_CONFIG_HOME/muxi/
- ~/.config/muxi/
Or run muxi config edit
```toml
<prefix>g
muxi_prefix = "g"
tmux_prefix = true
uppercase_overrides = false
[bindings]
e = { popup = { title = " sessions " }, command = "muxi sessions edit" }
c = { popup = { title = " config " }, command = "muxi config edit" }
c = { popup = { title = " muxi " }, command = "muxi sessions switch --interactive" }
tmux run-shell "tmux switch-client -l"
M-Space = { command = "tmux switch-client -l" }
[bindings.g] command = "tmux send htop Enter" # Make tmux do the hard work for you!
[bindings.l]
popup = { width = "75%", height = "60%" } command = "muxi sessions | less" ```
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