tmux 的射线式命令面板 — 速度快、可编写脚本、易于扩展
A command palette for tmux. It runs on Bun, has no runtime dependencies, and opens quickly enough to use as a regular tmux binding.
Type a few letters, pick a command, hit enter: split a pane, jump to a window,
detach a session, open a popup tool, or switch to a custom palette. User config
lives in ~/.config/tmux-palette/*.json, so local changes survive repo updates.
Commands — main palette for panes, windows, sessions, and built-in tmux actions.
https://github.com/user-attachments/assets/3a8f3951-619f-46b4-a180-b9a03ccb8593
Themes + plugins — theme picker with live preview, plus custom palettes powered by shell commands.
https://github.com/user-attachments/assets/5edce838-9199-4123-8262-352bc47e989c
The tool is in beta. It's stable enough to use day-to-day, but the surface area is still settling — I want the next few weeks to be about running it myself, gathering feedback, and shaking out bugs rather than growing the feature set.
If you'd like to contribute, the most useful work right now is anything that improves the existing base (refactors, perf, polish, docs) or fixes a bug. New features will likely get closed — no hard feelings, but please open an issue first to discuss before writing code.
hidden.jsonTerminal theme that follows your terminal colors. Pick one with live preview, or drop your own{ "popup": "htop" } to open tools like btop, lazygit, log tails, or fzf scripts in a tmux popupexamples/~/.config/tmux-palette/*.jsonlazygit, htop, btop, or log tails in a centered tmux popup.gh pr list that opens PRs in your browser.M-t for Tools or M-a for Appearance.See examples/ for drop-in palettes you can copy into
~/.config/tmux-palette/palettes/.
Use TPM if you already use it; otherwise manual install is the simplest path. The AI-agent option is just a guided setup flow.
display-popup -E support)gh, jq, docker, npm, git, etc.Manual install
Requires Bun: https://bun.sh
git clone https://github.com/eduwass/tmux-palette ~/Sites/tmux-palette
cd ~/Sites/tmux-palette
bun installBind it to a tmux key in your .tmux.conf — Ctrl+Space gives the most "Raycast-feel" since it skips the prefix:
bind -n C-Space run-shell "~/Sites/tmux-palette/bin/tmux-palette.sh"Or if you'd rather go through the tmux prefix:
bind p run-shell "~/Sites/tmux-palette/bin/tmux-palette.sh"Reload: tmux source-file ~/.tmux.conf and hit your binding.
Install via TPM (Tmux Plugin Manager)
Requires Bun: https://bun.sh
Add to your .tmux.conf:
set -g @plugin 'eduwass/tmux-palette'
set -g @palette-key 'C-Space' # optional, default: C-Space (no-prefix)
set -g @palette-find-pane-key 'M-f' # optional, no binding by default
set -g @palette-move-pane-key 'M-m' # optional, no binding by defaultThen prefix + I (TPM's install key) to install. TPM clones the repo,
runs bun install on first load, and binds the keys for you. Set
@palette-key 'off' to skip the main binding and bind it yourself.
Guided onboarding with an AI agent
This is optional; it is just a guided setup flow. Choose it if you want an agent to drive the onboarding experience: install the repo, set up the tmux binding, test that it opens, and optionally create your first custom commands or theme.
Paste the prompt below into Claude Code, Codex, opencode, Cursor, or any AI coding agent.
…split horiz).vimKeys in navigation.json for Ctrl+J/K (down/up) and Ctrl+U/D (page), replacing the search-box bindings for those keys.Auto-aliases: initials of multi-word titles match automatically. Type nw for "New
Window", cs for "Choose Session", sh for "Split Horizontal", etc.
bun test, TypeScript, Fallow dead-code, and Fallow duplication checks.~/.config/tmux-palette/; normal customization should not
require editing source files.{ "shell": "..." } and { "popup": "..." } actions execute through the user's
shell by design.Drop-in user config lives in ~/.config/tmux-palette/. One JSON file per
concern — no source edits, no fork, survives upstream pulls.
Path: ~/.config/tmux-palette/palettes/.json
Define a brand-new palette and bind any key to its name:
bind -n M-q run-shell "~/Sites/tmux-palette/bin/tmux-palette.sh my-favs"// ~/.config/tmux-palette/palettes/my-favs.json
{
"title": "Favorites",
"from": ["Toggle Diff Viewer", "Find Pane", "Choose Session"],
"fromCategory": "Tools",
"items": [
{
"icon": "",
"title": "Custom item only in this palette",
"action": { "tmux": "run-shell '~/scripts/x.sh'" },
},
],
}from — array of item titles to pull from the main commands palette (built-ins + your commands.json)fromCategory — pull every item from one categorycommand — shell command that prints a JSON array of Item objects to stdout (see plugins below)items — brand-new items defined inlinetitle / grouped / emptyText — same as built-in palettesAll keys optional. Resolution order: from → fromCategory → command → items.
Drop-in ready-to-use palettes live in
examples/— git branches, GitHub PRs (with color-coded status dots), Docker container logs, npm scripts, file picker. Copy one and bind a key.
The command field is the plugin escape hatch — fzf-style. Anything
that prints to stdout becomes a palette. Two output modes:
JSON mode — full control. Print a JSON array of Item objects:
// ~/.config/tmux-palette/palettes/github-prs.json
{
"title": "GitHub PRs",
"command": "gh pr list --json number,title,url --jq '[.[] | {icon: \"\", title: ((.number|tostring) + \" \" + .title), action: {shell: (\"gh pr view \" + (.number|tostring) + \" --web\")}}]'",
}Plain-text mode — fzf-style. Print one item per line, define a
default action template at the palette level with {} substituted
for the selected line:
// ~/.config/tmux-palette/palettes/git-branches.json
{
"title": "Git Branches",
"command": "git branch --format='%(refname:short)'",
"action": { "tmux": "send-keys 'git checkout {}' Enter" },
}This means most "command that prints lines" tools you'd pipe through fzf can become tmux-palette palettes with no scripting — just the JSON config and an action template.
Write the command in any language, distribute it however you want (gist, repo, copy-paste). The plugin runs every time the palette opens (no caching), so for expensive calls add your own cache layer. Errors are surfaced as a single item in the palette so failures stay visible without crashing the popup.
hidden.json — hide built-in itemsDrop a JSON array of item titles to skip them in the main commands palette:
["Toggle Status Bar", "Reload Config", "Toggle OpenTUI Top Bar"]Items still appear if you reference them by title in a custom palette
(see above) — hidden.json is just about decluttering the default.
commands.json — your own itemsAppend items to the commands palette without editing source:
[
{
"icon": "",
"title": "Toggle Diff Viewer",
"category": "Tools",
"action": { "tmux": "run-shell '/path/to/script.sh'" }
},
{
"icon": "",
"title": "Open Project in Cursor",
"category": "Tools",
"action": { "shell": "cursor /path/to/project" }
},
{
"icon": "",
"title": "htop",
"category": "Tools",
"action": { "popup": "htop" }
}
]Action types: { "tmux": "..." }, { "shell": "..." }, { "popup": "..." }, { "palette": "find-pane" }.
{ "popup": "htop" } opens the given command in a centered tmux popup
(80% × 80%, closes when the command exits). Handy for log viewers,
htop, btop, less, fzf-driven tools, etc.
navigation.json — list navigation behavior{
"wrapAtListEnds": true,
"vimKeys": true
}All keys optional. wrapAtListEnds controls list navigation at the first
and last selectable items. It defaults to true, so moving past either
end wraps around. Set it to false to make the beginning and end hard
stops.
vimKeys adds Ctrl+J/K for moving down/up and Ctrl+U/D for paging,
replacing the search-box edit bindings for those keys. Default: false.
sizing.json — popup dimensions and borders{
"maxHeight": 28,
"width": 90,
"padX": 3,
"mobileWidth": 80,
"border": "none",
"popupBorder": "none"
}All keys optional. maxHeight caps how tall the popup gets when you
have lots of commands. width is the fixed popup width. padX is the
horizontal padding inside the popup.
mobileWidth is the client-width threshold for auto-fullscreen mode:
when the terminal is narrower than this many columns (iOS terminals
like Blink or Moshi typically run 50-60 cols), the popup goes
edge-to-edge with padX=1. Defaults to 80, set to 0 to disable.
border is the main palette border, popupBorder is the border for
{ "popup": "..." } action popups. Both default to none. Accepted
values: none, single, double, heavy, rounded, padded,
simple — passed straight to tmux display-popup -b. rounded works
but its corner glyphs can leave small visual gaps against the
surrounding terminal, so it is not the default.
Open the main palette and pick Switch Theme... (under Appearance). Arrow-key through the list — every theme lives-previews instantly so you see the colors apply before you commit. Enter saves it and returns you to the previous palette with the new theme
暂无开放 Issues,或尚未同步最近议题。