A small fzf command palette for tmux prefix key bindings.
It shows a compact searchable list of:
Key Description
The selected binding's full tmux command appears in the preview panel and runs when you press Enter.
- tmux 3.2 or newer
- fzf
- bash
- awk
- sort
tmux uses a prefix key before most key bindings. The default prefix is Ctrl-b.
On macOS:
brew install tmux fzfOn Debian/Ubuntu:
sudo apt install tmux fzfOn Arch Linux:
sudo pacman -S tmux fzfAfter installing, press your tmux prefix, then K to open the palette. With the
default tmux prefix, that is Ctrl-b, then K.
Search for a binding and press Enter. The selected tmux command runs.
curl -fsSL https://raw.githubusercontent.com/programbo/tmux-key-palette/main/install.sh | bashTo inspect the installer before running it:
curl -fsSL https://raw.githubusercontent.com/programbo/tmux-key-palette/main/install.sh -o install.sh
less install.sh
bash install.shThe installer:
- installs
tmux-key-paletteto~/.local/bin - adds a managed
prefix + Kbinding to~/.tmux.confwhen that key is free - updates an existing managed block or existing
tmux-key-palettebinding - refuses to overwrite an unrelated
prefix + Kbinding - sources
~/.tmux.confwhen run inside tmux
The default binding is K. Set TMUX_KEY_PALETTE_BIND_KEY to choose another
prefix key.
TMUX_KEY_PALETTE_BIND_KEY=P \
TMUX_KEY_PALETTE_POPUP_WIDTH=90 \
TMUX_KEY_PALETTE_POPUP_HEIGHT=70% \
curl -fsSL https://raw.githubusercontent.com/programbo/tmux-key-palette/main/install.sh | bashIf prefix + K is already used, the installer leaves that binding alone:
tmux-key-palette: ~/.tmux.conf already has a binding for prefix + K:
bind K display-popup ...
Not overwriting it. Re-run with TMUX_KEY_PALETTE_BIND_KEY=P to choose another key.
bind K display-popup -E -w 80 -h 60% '~/.local/bin/tmux-key-palette'If ~/.local/bin is not in your PATH, either add it or bind tmux to the full
install path as shown above.
Remove the installed script:
rm -f ~/.local/bin/tmux-key-paletteRemove the managed block from ~/.tmux.conf:
perl -0pi -e 's/\n?# >>> tmux-key-palette >>>\n.*?\n# <<< tmux-key-palette <<<\n?/\n/s' ~/.tmux.confThen reload tmux config or restart tmux:
tmux source-file ~/.tmux.conf- If the palette does not appear, confirm
display-popupis available withtmux -V. tmux 3.2 or newer is required. - If
fzfis not found, check that it is installed and on yourPATHwithwhich fzf. - If the binding was not created, read the installer message. It refuses to
overwrite an existing unrelated binding for the same prefix key. Re-run with
TMUX_KEY_PALETTE_BIND_KEY=Por add a manual binding.