-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add core functionality to switch to most recent tab with a popup similar to the command palette #10103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yasuf
wants to merge
107
commits into
ghostty-org:main
Choose a base branch
from
yasuf:feature/mru-tabs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…still needs to be done
…another where the new tab wasnt added to the history when it was visited via the MRU tab switcher
…ve to end of document
From ghostty-org#10074 The test comments explain in detail.
When paste_from_clipboard is triggered but the clipboard contains no text (e.g., an image), send the raw Ctrl+V keypress to the terminal instead of silently returning. This allows applications to handle their own clipboard reading (e.g., via wl-paste for images on Wayland).
Make clipboardRequest return bool to indicate whether the action could be performed. For paste requests, synchronously check if the clipboard contains text formats before starting the async read. This allows 'performable:paste_from_clipboard' keybinds to pass through when the clipboard contains non-text content (e.g., images), enabling terminal applications to handle their own clipboard reading. Changes: - Surface.startClipboardRequest now returns bool - paste_from_clipboard/paste_from_selection actions return the result - GTK apprt checks clipboard formats synchronously before async read - Embedded apprt always returns true (can't check synchronously) - All other call sites discard the return value with _
End the currently active key sequence, if any, and flush the keys up to this point to the terminal, excluding the key that triggered this action. For example: `ctrl+w>escape=end_key_sequence` would encode `ctrl+w` to the terminal and exit the key sequence. Normally, an invalid sequence will reset the key sequence and flush all data including the invalid key. This action allows you to flush only the prior keys, which is useful when you want to bind something like a control key (`ctrl+w`) but not send additional inputs.
As far as I understand ghostty integrates with systemd already nowadays, and manages its own scopes/cgroups for tabs. As such, explicitly moving launching ghostty into a separate systemd scope from nautilus no longer seems necessary.
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.
Description
Addresses #1844
I tried an approach trying to copy what's in
macos/Sources/Features/Command Palette/CommandPalette.swiftin regards to the key handlers, in this version I usedevent.keyCodeto handle keystrokes. I think it's possible to do it with the same approach asi n CommandPalette but I was just running into bugs when attempting that.There is one small-ish bug that if you open the popup and leave the current tab with the popup still open, when you come back to it you still see the tab switcher and I think it should disappear, it doesn't affect the UI/UX in a major way but I definitely think it needs to be fixed, I can thinker with either:
CommandPalette.swiftfor key handlers.Happy to address any feedback, I want these code changes to be up to par with the codebase's standards.
AI Disclaimer: I used Opus 4.5 to generate the solution and I manually typed in all code changes, tried a few other approaches and removed unnecessary features that were generated by the prompt.
If you want to play around simply checkout this branch, run the project and press CMD + P on MacOS, this was implemented only for MacOS at the moment, we'd still need to mimic this functionality in GTK.
Also you can press CMD + P multiple times and you should see the selector move 1 option down.
ghostty_mru_popup.mov