input: add prompt_window_title action#10767
input: add prompt_window_title action#10767prsweet wants to merge 3 commits intoghostty-org:mainfrom
Conversation
|
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. |
jcollie
left a comment
There was a problem hiding this comment.
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
b09235b to
c6d3d5f
Compare
…o after the window one
jcollie
left a comment
There was a problem hiding this comment.
Use Unicode ellipsis … directly instead of the escape.
jcollie
left a comment
There was a problem hiding this comment.
OK, the Zig looks good to me. Still need someone to look over the Swift code.
|
Amazing feature. It was the sole thing ghostty lacks for folks who use lots of terminal tabs (along with tmux) |
|
@jcollie what should i do next about it? |
|
@prsweet wait until one of the macOS devs have time to review this. |
Summary
Adds a new
prompt_window_titlekeybinding action that allows users to rename the current window via a pop-up prompt, similar to the existingprompt_tab_titleandprompt_surface_titleactions.Closes #10469
Changes
Core (Zig)
windowvariant toPromptTitleenumprompt_window_titleaction and its scope.prompt_title,.window)GHOSTTY_PROMPT_TITLE_WINDOWto C API enummacOS (Swift)
.windowcase toPromptTitleSwift enum.windowdispatch inpromptTitle()promptWindowTitle()methodGTK (Zig)
.windowcase (returns false, not yet implemented — same as.tab)Testing
zig buildcompiles with no errorszig build testpasses all testszig build run:AI Assistance Notice
AI assistance was used in the development of this PR. I have reviewed all changes and understand the code.