Skip to content

Comments

input: add prompt_window_title action#10767

Open
prsweet wants to merge 3 commits intoghostty-org:mainfrom
prsweet:add-prompt-window-title
Open

input: add prompt_window_title action#10767
prsweet wants to merge 3 commits intoghostty-org:mainfrom
prsweet:add-prompt-window-title

Conversation

@prsweet
Copy link

@prsweet prsweet commented Feb 16, 2026

Summary

Adds a new prompt_window_title keybinding action that allows users to rename the current window via a pop-up prompt, similar to the existing prompt_tab_title and prompt_surface_title actions.

Closes #10469

Changes

Core (Zig)

  • src/apprt/action.zig — Added window variant to PromptTitle enum
  • src/input/Binding.zig — Added prompt_window_title action and its scope
  • src/Surface.zig — Added action dispatch (.prompt_title, .window)
  • src/input/command.zig — Added command palette entry: "Change Window Title..."
  • include/ghostty.h — Added GHOSTTY_PROMPT_TITLE_WINDOW to C API enum

macOS (Swift)

  • Ghostty.Action.swift — Added .window case to PromptTitle Swift enum
  • Ghostty.App.swift — Added .window dispatch in promptTitle()
  • BaseTerminalController.swift — Added promptWindowTitle() method

GTK (Zig)

  • application.zig — Added .window case (returns false, not yet implemented — same as .tab)

Testing

  • zig build compiles with no errors
  • zig build test passes all tests
  • Tested on macOS via zig build run:
    • Command palette shows "Change Window Title..." entry
    • Dialog appears with "Change Window Title" header
    • Setting a title updates the window title
    • Clearing the title restores the default

AI Assistance Notice

AI assistance was used in the development of this PR. I have reviewed all changes and understand the code.

@prsweet prsweet requested review from a team as code owners February 16, 2026 21:48
@github-actions
Copy link
Contributor

Hi @prsweet, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions bot closed this Feb 16, 2026
@jcollie jcollie reopened this Feb 16, 2026
Copy link
Member

@jcollie jcollie left a comment

Choose a reason for hiding this comment

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

Not a full review since I'm not a macOS dev but I noticed one nitpick.

Add a new keybinding action 'prompt_window_title' that allows users to
rename the current window via a pop-up prompt, similar to the existing
'prompt_tab_title' and 'prompt_surface_title' actions.

Changes:
- Add 'window' variant to PromptTitle enum in apprt/action.zig
- Add 'prompt_window_title' to the binding Action enum
- Add handler in Surface.zig to dispatch the action
- Add command palette entry ('Change Window Title...')
- Add GHOSTTY_PROMPT_TITLE_WINDOW to C API header
- Add macOS implementation (promptWindowTitle on BaseTerminalController)
- Add GTK stub (returns false, not yet supported)

Closes ghostty-org#10469
@prsweet prsweet force-pushed the add-prompt-window-title branch from b09235b to c6d3d5f Compare February 16, 2026 22:33
Copy link
Member

@jcollie jcollie left a comment

Choose a reason for hiding this comment

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

Use Unicode ellipsis directly instead of the escape.

@prsweet prsweet requested a review from jcollie February 16, 2026 23:13
Copy link
Member

@jcollie jcollie left a comment

Choose a reason for hiding this comment

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

OK, the Zig looks good to me. Still need someone to look over the Swift code.

@jcollie jcollie added this to the 1.3.0 milestone Feb 16, 2026
@jcollie jcollie mentioned this pull request Feb 17, 2026
1 task
@SEJeff
Copy link

SEJeff commented Feb 18, 2026

Amazing feature. It was the sole thing ghostty lacks for folks who use lots of terminal tabs (along with tmux)

@prsweet
Copy link
Author

prsweet commented Feb 20, 2026

@jcollie what should i do next about it?

@jcollie
Copy link
Member

jcollie commented Feb 20, 2026

@prsweet wait until one of the macOS devs have time to review this.

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 the ability to name/re-name a window

3 participants