opencode-zellij-tab-status
v1.0.1
Published
OpenCode plugin that updates your Zellij tab name to reflect the AI agent status (running, complete, error, question)
Maintainers
Readme
opencode-zellij-tab-status
An OpenCode plugin that updates your Zellij tab name to reflect the AI agent's current status — so you can see at a glance whether the agent is running, waiting for input, needs permission, done, or errored, even from another tab.
How it looks
| Status | Tab name example |
|------------|-------------------------|
| Running | .dotfiles |
| Complete | .dotfiles |
| Error | .dotfiles |
| Question | .dotfiles |
| Permission | .dotfiles |
| Cleared | .dotfiles |
The icon is appended to the end of your existing tab name. Your tab's leading icon/name is preserved.
Requirements
- Zellij (tested on 0.43+)
- OpenCode
- OpenCode must be started from the focused Zellij tab (the plugin captures the focused tab name at startup)
- Nerd Font compatible terminal font
Installation
Add the plugin to your OpenCode config at ~/.config/opencode/config.json:
{
"plugin": ["opencode-zellij-tab-status"]
}If you already have other plugins, add it to the array:
{
"plugin": [
"@mohak34/opencode-notifier@latest",
"opencode-zellij-tab-status"
]
}OpenCode will install the plugin automatically on next startup.
Configuration
Create ~/.config/opencode/zellij-tab-status.json to override the default icons:
{
"icons": {
"running": "",
"complete": "",
"error": "",
"question": "",
"permission": ""
}
}Any omitted keys fall back to the defaults. The config is re-read on every event, so changes take effect immediately without restarting OpenCode.
The icons are Nerd Font glyphs — make sure your terminal font supports them.
Clearing the status icon (optional Zellij keybind)
The plugin appends a status icon when OpenCode changes state, but does not automatically clear it when you close OpenCode. You can set up a Zellij keybind to strip the icon from the focused tab on demand.
1. Copy the clear script
Copy scripts/clear-tab-status.sh from this package to somewhere on your $PATH, e.g.:
cp node_modules/opencode-zellij-tab-status/scripts/clear-tab-status.sh ~/.local/bin/clear-tab-status
chmod +x ~/.local/bin/clear-tab-statusOr just download it directly:
curl -fsSL https://raw.githubusercontent.com/victor-falcon/opencode-zellij-tab-status/main/scripts/clear-tab-status.sh \
-o ~/.local/bin/clear-tab-status
chmod +x ~/.local/bin/clear-tab-status2. Add the keybind to your Zellij config
In ~/.config/zellij/config.kdl, add a keybind inside the locked mode block (or whichever mode you prefer). This example uses Super Shift c:
keybinds {
locked {
bind "Super Shift c" {
Run "bash" "-c" "~/.local/bin/clear-tab-status" {
floating true
height 1
width 1
close_on_exit true
}
}
}
}After saving, reload Zellij config (zellij action reload-config or restart Zellij).
How it works
- On startup the plugin records the name of the focused Zellij tab (where OpenCode is running).
- On each
session.status(busy),session.idle,session.error,permission.ask, ortool.execute.before(question tool) event, it appends the appropriate icon to that tab name. - If OpenCode is running in a non-focused tab when a status change occurs, it temporarily switches to that tab, renames it, then switches back.
- User cancellations (ESC / abort) do not trigger the error icon.
- Rapid status changes are debounced (300 ms) to avoid flickering.
License
MIT
