Skip to content

add direct set_surface_title and set_tab_title actions#11373

Merged
mitchellh merged 1 commit intomainfrom
mitchellh/fix-issue-11316
Mar 11, 2026
Merged

add direct set_surface_title and set_tab_title actions#11373
mitchellh merged 1 commit intomainfrom
mitchellh/fix-issue-11316

Conversation

@mitchellh
Copy link
Copy Markdown
Contributor

Fixes #11316

This mirrors the prompt actions (hence why there is no window action here) and enables setting titles via keybind actions which importantly lets this work via command palettes, App Intents, AppleScript, etc.

Fixes #11316

This mirrors the `prompt` actions (hence why there is no window action
here) and enables setting titles via keybind actions which importantly
lets this work via command palettes, App Intents, AppleScript, etc.
@mitchellh mitchellh added this to the 1.3.1 milestone Mar 11, 2026
@mitchellh mitchellh requested review from a team as code owners March 11, 2026 16:26
@mitchellh mitchellh changed the title input: add direct set_surface_title and set_tab_title actions add direct set_surface_title and set_tab_title actions Mar 11, 2026
Comment thread src/Surface.zig
),

.set_surface_title => |v| {
const title = try self.alloc.dupeZ(u8, v);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I'd like to eventually just allow bindings to support [:0]const u8 so we don't have to do this, but we already do this elsewhere and I didn't want to muddy the PR.

@mitchellh mitchellh merged commit 8ad9ec8 into main Mar 11, 2026
127 of 129 checks passed
@mitchellh mitchellh deleted the mitchellh/fix-issue-11316 branch March 11, 2026 16:35
mkaz added a commit to mkaz/ghostty-website that referenced this pull request Mar 21, 2026
Adds a section to docs that shows how to create a new tab and set the
title using AppleScript.

The set_tab_title as added in: ghostty-org/ghostty#11373
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add set_<thing>_title:<title> binding actions

2 participants