-
Notifications
You must be signed in to change notification settings - Fork 644
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
Add an equivalent to iTerm's "show/hide all windows" hotkey (Fix for: #2205) #2338
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Some minor requests...
Amazing. I'm not a MacOS / Zig dev - so flying semi-blind here. Appreciate the feedback. I dropped the initial commit adding the |
This also slightly changes the code, as the duplication of the for loop was making it harder to read now. I think technically slightly less efficient, but this is hardly a hot code path, so should be fine imo.
Looks great, once CI passes I'll merge. Thanks! |
Thank you for all the hard work building this. Been daily'ing this branch, and it's been really great! |
@@ -572,14 +574,16 @@ class AppDelegate: NSObject, | |||
|
|||
/// Toggles visibility of all Ghosty Terminal windows. When hidden, activates Ghostty as the frontmost application | |||
@IBAction func toggleVisibility(_ sender: Any) { | |||
for controller in NSApp.windows.compactMap({ $0.windowController as? BaseTerminalController }) { | |||
// We only care about terminal windows. | |||
for window in NSApp.windows.filter({ $0.windowController is BaseTerminalController }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mitchellh -- this code change breaks things for me when using this in conjunction with fullscreen. See video: https://www.tella.tv/video/my-video-38vn
First time contributor, so if I'm violating something, please let me know.
This feature should fix: #2205 (and is coincidentally basically the only thing holding me back from daily driving Ghostty).
The pr adds an action called
toggle_visibility
, which essentially hides and shows all Ghostty windows with a global key (and from the menubar).