You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow setting the border title of type = "popup" custom command popups
#5031
When several popup bindings are open over the day (lazygit, a scratch shell, an agent dispatcher), it would be nice for each popup's border to say what it is.
Current behavior (v0.9.3 / master)
render_popup_surface (src/server/client_shell.rs) uses the popup terminal's manual_label as the title, falling back to "popup".
spawn_custom_popup_command (src/app/custom_commands.rs) never sets that label, so keybinding popups always fall back to "popup".
Renaming afterwards isn't possible: a popup has no pane ID, so pane.rename can't reach it.
The only way to get a custom title today is to wrap the command in a local plugin with a [[panes]] entry (placement = "popup", title = "...") plus an action and a plugin_action binding. That's a lot of setup just for a label.
Proposal
Add an optional title field to [[keys.command]] popup bindings. When it's not set, the popup keeps the existing "popup" title:
This matches how plugin popup panes already take a title in their manifest.
Implementation sketch
In spawn_custom_popup_command, once the popup terminal is created, call set_manual_label on it with the binding's title when it's set. The title rendering already handles the rest. This would probably mean threading an optional label through spawn_popup_shell_command / spawn_popup_command, plus adding the config key and a config-reference entry.
I'm happy to send a PR if this direction sounds good.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Popups opened from a
[[keys.command]]binding withtype = "popup"always showpopupas their border title, and there's currently no way to change it:When several popup bindings are open over the day (lazygit, a scratch shell, an agent dispatcher), it would be nice for each popup's border to say what it is.
Current behavior (v0.9.3 / master)
render_popup_surface(src/server/client_shell.rs) uses the popup terminal'smanual_labelas the title, falling back to"popup".spawn_custom_popup_command(src/app/custom_commands.rs) never sets that label, so keybinding popups always fall back to"popup".pane.renamecan't reach it.[[panes]]entry (placement = "popup",title = "...") plus an action and aplugin_actionbinding. That's a lot of setup just for a label.Proposal
Add an optional
titlefield to[[keys.command]]popup bindings. When it's not set, the popup keeps the existing"popup"title:This matches how plugin popup panes already take a
titlein their manifest.Implementation sketch
In
spawn_custom_popup_command, once the popup terminal is created, callset_manual_labelon it with the binding'stitlewhen it's set. The title rendering already handles the rest. This would probably mean threading an optional label throughspawn_popup_shell_command/spawn_popup_command, plus adding the config key and a config-reference entry.I'm happy to send a PR if this direction sounds good.
All reactions