macOS: Focus Terminal App Intent#8961
Merged
mitchellh merged 9 commits intoghostty-org:mainfrom Sep 30, 2025
Merged
Conversation
…ion process to animateIn
mitchellh
approved these changes
Sep 30, 2025
Contributor
mitchellh
left a comment
There was a problem hiding this comment.
Awesome. This looks good to me.
Just noting it so it's somewhere: with this in place, we can now implement the PRESENT_TERMINAL action too. I don't think this is used anywhere on the macOS side yet but it is an apprt action we haven't implemented.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8791
Discussion: #8657
Summary
This adds the FocusTerminalIntent App Intent and related function (focusSurface), allows external tools (such as Shortcuts/Siri) to programmatically move focus to a specific terminal window or tab.
Verification
This functionality has been tested across following scenarios, confirming correct focus behavior for:
Note
It is not supported to move focus to a split that is hidden by a zoomed split. The same applies to the CloseTerminalIntent.
AI Disclosure
This pull request was made with assistance from Claude Code.
I reviewed all AI-generated code and wrote the final output manually.