From 1570ef01a78072ad34f3fab160ed85d180c46465 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 28 Sep 2024 15:20:24 -0700 Subject: [PATCH] rename slide to quick terminal --- include/ghostty.h | 2 +- macos/Ghostty.xcodeproj/project.pbxproj | 38 +++++++------- macos/Sources/App/macOS/AppDelegate.swift | 18 +++---- macos/Sources/App/macOS/MainMenu.xib | 6 +-- .../QuickTerminal.xib} | 4 +- .../QuickTerminalController.swift} | 50 +++++++++---------- .../QuickTerminalPosition.swift} | 2 +- .../QuickTerminalWindow.swift} | 2 +- macos/Sources/Ghostty/Ghostty.App.swift | 8 +-- src/App.zig | 2 +- src/apprt/action.zig | 6 +-- src/apprt/glfw.zig | 2 +- src/apprt/gtk/App.zig | 2 +- src/input/Binding.zig | 27 ++++++---- 14 files changed, 89 insertions(+), 80 deletions(-) rename macos/Sources/Features/{SlideTerminal/SlideTerminal.xib => QuickTerminal/QuickTerminal.xib} (94%) rename macos/Sources/Features/{SlideTerminal/SlideTerminalController.swift => QuickTerminal/QuickTerminalController.swift} (81%) rename macos/Sources/Features/{SlideTerminal/SlideTerminalPosition.swift => QuickTerminal/QuickTerminalPosition.swift} (98%) rename macos/Sources/Features/{SlideTerminal/SlideTerminalWindow.swift => QuickTerminal/QuickTerminalWindow.swift} (97%) diff --git a/include/ghostty.h b/include/ghostty.h index 38affd16e..e66ce08ea 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -507,7 +507,7 @@ typedef enum { GHOSTTY_ACTION_TOGGLE_FULLSCREEN, GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW, GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS, - GHOSTTY_ACTION_TOGGLE_SLIDE_TERMINAL, + GHOSTTY_ACTION_TOGGLE_QUICK_TERMINAL, GHOSTTY_ACTION_GOTO_TAB, GHOSTTY_ACTION_GOTO_SPLIT, GHOSTTY_ACTION_RESIZE_SPLIT, diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index ed7b97d07..295de738c 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -62,10 +62,10 @@ A5CBD0562C9E65B80017A1AE /* DraggableWindowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD0552C9E65A50017A1AE /* DraggableWindowView.swift */; }; A5CBD0582C9F30960017A1AE /* Cursor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD0572C9F30860017A1AE /* Cursor.swift */; }; A5CBD0592C9F37B10017A1AE /* Backport.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CEAFFE29C2410700646FDA /* Backport.swift */; }; - A5CBD05C2CA0C5C70017A1AE /* SlideTerminal.xib in Resources */ = {isa = PBXBuildFile; fileRef = A5CBD05B2CA0C5C70017A1AE /* SlideTerminal.xib */; }; - A5CBD05E2CA0C5EC0017A1AE /* SlideTerminalController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD05D2CA0C5E70017A1AE /* SlideTerminalController.swift */; }; - A5CBD0602CA0C90A0017A1AE /* SlideTerminalWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD05F2CA0C9080017A1AE /* SlideTerminalWindow.swift */; }; - A5CBD0642CA122E70017A1AE /* SlideTerminalPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD0632CA122E70017A1AE /* SlideTerminalPosition.swift */; }; + A5CBD05C2CA0C5C70017A1AE /* QuickTerminal.xib in Resources */ = {isa = PBXBuildFile; fileRef = A5CBD05B2CA0C5C70017A1AE /* QuickTerminal.xib */; }; + A5CBD05E2CA0C5EC0017A1AE /* QuickTerminalController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD05D2CA0C5E70017A1AE /* QuickTerminalController.swift */; }; + A5CBD0602CA0C90A0017A1AE /* QuickTerminalWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD05F2CA0C9080017A1AE /* QuickTerminalWindow.swift */; }; + A5CBD0642CA122E70017A1AE /* QuickTerminalPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD0632CA122E70017A1AE /* QuickTerminalPosition.swift */; }; A5CBD06B2CA322430017A1AE /* GlobalEventTap.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CBD06A2CA322320017A1AE /* GlobalEventTap.swift */; }; A5CC36132C9CD72D004D6760 /* SecureInputOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CC36122C9CD729004D6760 /* SecureInputOverlay.swift */; }; A5CC36152C9CDA06004D6760 /* View+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5CC36142C9CDA03004D6760 /* View+Extension.swift */; }; @@ -138,10 +138,10 @@ A5B3053D299BEAAB0047F10C /* Ghostty.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Ghostty.entitlements; sourceTree = ""; }; A5CBD0552C9E65A50017A1AE /* DraggableWindowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DraggableWindowView.swift; sourceTree = ""; }; A5CBD0572C9F30860017A1AE /* Cursor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cursor.swift; sourceTree = ""; }; - A5CBD05B2CA0C5C70017A1AE /* SlideTerminal.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SlideTerminal.xib; sourceTree = ""; }; - A5CBD05D2CA0C5E70017A1AE /* SlideTerminalController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlideTerminalController.swift; sourceTree = ""; }; - A5CBD05F2CA0C9080017A1AE /* SlideTerminalWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlideTerminalWindow.swift; sourceTree = ""; }; - A5CBD0632CA122E70017A1AE /* SlideTerminalPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlideTerminalPosition.swift; sourceTree = ""; }; + A5CBD05B2CA0C5C70017A1AE /* QuickTerminal.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = QuickTerminal.xib; sourceTree = ""; }; + A5CBD05D2CA0C5E70017A1AE /* QuickTerminalController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickTerminalController.swift; sourceTree = ""; }; + A5CBD05F2CA0C9080017A1AE /* QuickTerminalWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickTerminalWindow.swift; sourceTree = ""; }; + A5CBD0632CA122E70017A1AE /* QuickTerminalPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickTerminalPosition.swift; sourceTree = ""; }; A5CBD06A2CA322320017A1AE /* GlobalEventTap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalEventTap.swift; sourceTree = ""; }; A5CC36122C9CD729004D6760 /* SecureInputOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureInputOverlay.swift; sourceTree = ""; }; A5CC36142C9CDA03004D6760 /* View+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Extension.swift"; sourceTree = ""; }; @@ -214,7 +214,7 @@ A5CBD0672CA2704E0017A1AE /* Global Keybinds */, A56D58872ACDE6BE00508D2C /* Services */, A59630982AEE1C4400D64628 /* Terminal */, - A5CBD05A2CA0C5910017A1AE /* SlideTerminal */, + A5CBD05A2CA0C5910017A1AE /* QuickTerminal */, A5E112912AF73E4D00C6E0C2 /* ClipboardConfirmation */, A57D79252C9C8782001D522E /* Secure Input */, A534263E2A7DCC5800EBB7A2 /* Settings */, @@ -385,15 +385,15 @@ name = Products; sourceTree = ""; }; - A5CBD05A2CA0C5910017A1AE /* SlideTerminal */ = { + A5CBD05A2CA0C5910017A1AE /* QuickTerminal */ = { isa = PBXGroup; children = ( - A5CBD05B2CA0C5C70017A1AE /* SlideTerminal.xib */, - A5CBD05D2CA0C5E70017A1AE /* SlideTerminalController.swift */, - A5CBD0632CA122E70017A1AE /* SlideTerminalPosition.swift */, - A5CBD05F2CA0C9080017A1AE /* SlideTerminalWindow.swift */, + A5CBD05B2CA0C5C70017A1AE /* QuickTerminal.xib */, + A5CBD05D2CA0C5E70017A1AE /* QuickTerminalController.swift */, + A5CBD0632CA122E70017A1AE /* QuickTerminalPosition.swift */, + A5CBD05F2CA0C9080017A1AE /* QuickTerminalWindow.swift */, ); - path = SlideTerminal; + path = QuickTerminal; sourceTree = ""; }; A5CBD0672CA2704E0017A1AE /* Global Keybinds */ = { @@ -529,7 +529,7 @@ A5985CE62C33060F00C57AD3 /* man in Resources */, A5A1F8852A489D6800D1E8BC /* terminfo in Resources */, 552964E62B34A9B400030505 /* vim in Resources */, - A5CBD05C2CA0C5C70017A1AE /* SlideTerminal.xib in Resources */, + A5CBD05C2CA0C5C70017A1AE /* QuickTerminal.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -555,12 +555,12 @@ A5D0AF3D2B37804400D21823 /* CodableBridge.swift in Sources */, A5D0AF3B2B36A1DE00D21823 /* TerminalRestorable.swift in Sources */, C1F26EA72B738B9900404083 /* NSView+Extension.swift in Sources */, - A5CBD0642CA122E70017A1AE /* SlideTerminalPosition.swift in Sources */, + A5CBD0642CA122E70017A1AE /* QuickTerminalPosition.swift in Sources */, A596309C2AEE1C9E00D64628 /* TerminalController.swift in Sources */, A5CC36152C9CDA06004D6760 /* View+Extension.swift in Sources */, A56D58892ACDE6CA00508D2C /* ServiceProvider.swift in Sources */, - A5CBD0602CA0C90A0017A1AE /* SlideTerminalWindow.swift in Sources */, - A5CBD05E2CA0C5EC0017A1AE /* SlideTerminalController.swift in Sources */, + A5CBD0602CA0C90A0017A1AE /* QuickTerminalWindow.swift in Sources */, + A5CBD05E2CA0C5EC0017A1AE /* QuickTerminalController.swift in Sources */, A51BFC222B2FB6B400E92F16 /* AboutView.swift in Sources */, A5278A9B2AA05B2600CD3039 /* Ghostty.Input.swift in Sources */, A5CBD0562C9E65B80017A1AE /* DraggableWindowView.swift in Sources */, diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 47302f302..3686f7fb8 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -49,7 +49,7 @@ class AppDelegate: NSObject, @IBOutlet private var menuIncreaseFontSize: NSMenuItem? @IBOutlet private var menuDecreaseFontSize: NSMenuItem? @IBOutlet private var menuResetFontSize: NSMenuItem? - @IBOutlet private var menuSlideTerminal: NSMenuItem? + @IBOutlet private var menuQuickTerminal: NSMenuItem? @IBOutlet private var menuTerminalInspector: NSMenuItem? @IBOutlet private var menuEqualizeSplits: NSMenuItem? @@ -74,8 +74,8 @@ class AppDelegate: NSObject, /// Manages our terminal windows. let terminalManager: TerminalManager - /// Our slide terminal. This starts out uninitialized and only initializes if used. - private var slideController: SlideTerminalController? = nil + /// Our quick terminal. This starts out uninitialized and only initializes if used. + private var quickController: QuickTerminalController? = nil /// Manages updates let updaterController: SPUStandardUpdaterController @@ -314,7 +314,7 @@ class AppDelegate: NSObject, syncMenuShortcut(action: "increase_font_size:1", menuItem: self.menuIncreaseFontSize) syncMenuShortcut(action: "decrease_font_size:1", menuItem: self.menuDecreaseFontSize) syncMenuShortcut(action: "reset_font_size", menuItem: self.menuResetFontSize) - syncMenuShortcut(action: "toggle_slide_terminal", menuItem: self.menuSlideTerminal) + syncMenuShortcut(action: "toggle_quick_terminal", menuItem: self.menuQuickTerminal) syncMenuShortcut(action: "inspector:toggle", menuItem: self.menuTerminalInspector) syncMenuShortcut(action: "toggle_secure_input", menuItem: self.menuSecureInput) @@ -551,12 +551,12 @@ class AppDelegate: NSObject, setSecureInput(.toggle) } - @IBAction func toggleSlideTerminal(_ sender: Any) { - if slideController == nil { - slideController = SlideTerminalController(ghostty, baseConfig: nil) + @IBAction func toggleQuickTerminal(_ sender: Any) { + if quickController == nil { + quickController = QuickTerminalController(ghostty, baseConfig: nil) } - guard let slideController = self.slideController else { return } - slideController.slideToggle() + guard let quickController = self.quickController else { return } + quickController.toggle() } } diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/MainMenu.xib index f19f9d1ed..63aae4c60 100644 --- a/macos/Sources/App/macOS/MainMenu.xib +++ b/macos/Sources/App/macOS/MainMenu.xib @@ -32,6 +32,7 @@ + @@ -42,7 +43,6 @@ - @@ -217,10 +217,10 @@ - + - + diff --git a/macos/Sources/Features/SlideTerminal/SlideTerminal.xib b/macos/Sources/Features/QuickTerminal/QuickTerminal.xib similarity index 94% rename from macos/Sources/Features/SlideTerminal/SlideTerminal.xib rename to macos/Sources/Features/QuickTerminal/QuickTerminal.xib index 4bb068a7e..b2a99cbf5 100644 --- a/macos/Sources/Features/SlideTerminal/SlideTerminal.xib +++ b/macos/Sources/Features/QuickTerminal/QuickTerminal.xib @@ -6,14 +6,14 @@ - + - + diff --git a/macos/Sources/Features/SlideTerminal/SlideTerminalController.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift similarity index 81% rename from macos/Sources/Features/SlideTerminal/SlideTerminalController.swift rename to macos/Sources/Features/QuickTerminal/QuickTerminalController.swift index 07d7d42ed..5025e725c 100644 --- a/macos/Sources/Features/SlideTerminal/SlideTerminalController.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalController.swift @@ -3,15 +3,15 @@ import Cocoa import SwiftUI import GhosttyKit -/// Controller for the slide-style terminal. -class SlideTerminalController: BaseTerminalController { - override var windowNibName: NSNib.Name? { "SlideTerminal" } +/// Controller for the "quick" terminal. +class QuickTerminalController: BaseTerminalController { + override var windowNibName: NSNib.Name? { "QuickTerminal" } - /// The position for the slide terminal. - let position: SlideTerminalPosition + /// The position for the quick terminal. + let position: QuickTerminalPosition init(_ ghostty: Ghostty.App, - position: SlideTerminalPosition = .top, + position: QuickTerminalPosition = .top, baseConfig base: Ghostty.SurfaceConfiguration? = nil, surfaceTree tree: Ghostty.SplitNode? = nil ) { @@ -32,7 +32,7 @@ class SlideTerminalController: BaseTerminalController { // window close so we can animate out. window.delegate = self - // The slide window is not restorable (yet!). "Yet" because in theory we can + // The quick window is not restorable (yet!). "Yet" because in theory we can // make this restorable, but it isn't currently implemented. window.isRestorable = false @@ -47,14 +47,14 @@ class SlideTerminalController: BaseTerminalController { )) // Animate the window in - slideIn() + animateIn() } // MARK: NSWindowDelegate override func windowDidResignKey(_ notification: Notification) { super.windowDidResignKey(notification) - slideOut() + animateOut() } func windowWillResize(_ sender: NSWindow, to frameSize: NSSize) -> NSSize { @@ -67,43 +67,43 @@ class SlideTerminalController: BaseTerminalController { override func surfaceTreeDidChange(from: Ghostty.SplitNode?, to: Ghostty.SplitNode?) { super.surfaceTreeDidChange(from: from, to: to) - // If our surface tree is nil then we slide the window out. + // If our surface tree is nil then we animate the window out. if (to == nil) { - slideOut() + animateOut() } } - // MARK: Slide Methods + // MARK: Methods - func slideToggle() { + func toggle() { guard let window = self.window else { return } if (window.alphaValue > 0) { - slideOut() + animateOut() } else { - slideIn() + animateIn() } } - func slideIn() { + func animateIn() { guard let window = self.window else { return } // Animate the window in - slideWindowIn(window: window, from: position) + animateWindowIn(window: window, from: position) // If our surface tree is nil then we initialize a new terminal. The surface - // tree can be nil if for example we run "eixt" in the terminal and force a - // slide out. + // tree can be nil if for example we run "eixt" in the terminal and force + // animate out. if (surfaceTree == nil) { surfaceTree = .leaf(.init(ghostty.app!, baseConfig: nil)) } } - func slideOut() { + func animateOut() { guard let window = self.window else { return } - slideWindowOut(window: window, to: position) + animateWindowOut(window: window, to: position) } - private func slideWindowIn(window: NSWindow, from position: SlideTerminalPosition) { + private func animateWindowIn(window: NSWindow, from position: QuickTerminalPosition) { guard let screen = NSScreen.main else { return } // Move our window off screen to the top @@ -121,7 +121,7 @@ class SlideTerminalController: BaseTerminalController { } } - private func slideWindowOut(window: NSWindow, to position: SlideTerminalPosition) { + private func animateWindowOut(window: NSWindow, to position: QuickTerminalPosition) { guard let screen = NSScreen.main else { return } // Keep track of if we were the key window. If we were the key window then we @@ -164,7 +164,7 @@ class SlideTerminalController: BaseTerminalController { // MARK: First Responder @IBAction override func closeWindow(_ sender: Any) { - // Instead of closing the window, we slide it out. - slideOut() + // Instead of closing the window, we animate it out. + animateOut() } } diff --git a/macos/Sources/Features/SlideTerminal/SlideTerminalPosition.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalPosition.swift similarity index 98% rename from macos/Sources/Features/SlideTerminal/SlideTerminalPosition.swift rename to macos/Sources/Features/QuickTerminal/QuickTerminalPosition.swift index d65f02038..c7509c465 100644 --- a/macos/Sources/Features/SlideTerminal/SlideTerminalPosition.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalPosition.swift @@ -1,6 +1,6 @@ import Cocoa -enum SlideTerminalPosition { +enum QuickTerminalPosition { case top /// Set the loaded state for a window. diff --git a/macos/Sources/Features/SlideTerminal/SlideTerminalWindow.swift b/macos/Sources/Features/QuickTerminal/QuickTerminalWindow.swift similarity index 97% rename from macos/Sources/Features/SlideTerminal/SlideTerminalWindow.swift rename to macos/Sources/Features/QuickTerminal/QuickTerminalWindow.swift index fe3426d2b..2d9d1df7c 100644 --- a/macos/Sources/Features/SlideTerminal/SlideTerminalWindow.swift +++ b/macos/Sources/Features/QuickTerminal/QuickTerminalWindow.swift @@ -1,6 +1,6 @@ import Cocoa -class SlideTerminalWindow: NSWindow { +class QuickTerminalWindow: NSWindow { // Both of these must be true for windows without decorations to be able to // still become key/main and receive events. override var canBecomeKey: Bool { return true } diff --git a/macos/Sources/Ghostty/Ghostty.App.swift b/macos/Sources/Ghostty/Ghostty.App.swift index f1e35cb99..05c01a75e 100644 --- a/macos/Sources/Ghostty/Ghostty.App.swift +++ b/macos/Sources/Ghostty/Ghostty.App.swift @@ -482,8 +482,8 @@ extension Ghostty { case GHOSTTY_ACTION_RENDERER_HEALTH: rendererHealth(app, target: target, v: action.action.renderer_health) - case GHOSTTY_ACTION_TOGGLE_SLIDE_TERMINAL: - toggleSlideTerminal(app, target: target) + case GHOSTTY_ACTION_TOGGLE_QUICK_TERMINAL: + toggleQuickTerminal(app, target: target) case GHOSTTY_ACTION_CLOSE_ALL_WINDOWS: fallthrough @@ -833,12 +833,12 @@ extension Ghostty { } } - private static func toggleSlideTerminal( + private static func toggleQuickTerminal( _ app: ghostty_app_t, target: ghostty_target_s ) { guard let appDelegate = NSApplication.shared.delegate as? AppDelegate else { return } - appDelegate.toggleSlideTerminal(self) + appDelegate.toggleQuickTerminal(self) } private static func setTitle( diff --git a/src/App.zig b/src/App.zig index 369fc4288..5922528ab 100644 --- a/src/App.zig +++ b/src/App.zig @@ -324,7 +324,7 @@ pub fn performAction( .open_config => try rt_app.performAction(.app, .open_config, {}), .reload_config => try self.reloadConfig(rt_app), .close_all_windows => try rt_app.performAction(.app, .close_all_windows, {}), - .toggle_slide_terminal => try rt_app.performAction(.app, .toggle_slide_terminal, {}), + .toggle_quick_terminal => try rt_app.performAction(.app, .toggle_quick_terminal, {}), } } diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 6fd15ec9c..2f7616bc4 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -93,8 +93,8 @@ pub const Action = union(Key) { /// Toggle whether window directions are shown. toggle_window_decorations, - /// Toggle the slide terminal in or out. - toggle_slide_terminal, + /// Toggle the quick terminal in or out. + toggle_quick_terminal, /// Jump to a specific tab. Must handle the scenario that the tab /// value is invalid. @@ -179,7 +179,7 @@ pub const Action = union(Key) { toggle_fullscreen, toggle_tab_overview, toggle_window_decorations, - toggle_slide_terminal, + toggle_quick_terminal, goto_tab, goto_split, resize_split, diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index a64ed0afc..87314c0e1 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -196,7 +196,7 @@ pub const App = struct { .close_all_windows, .toggle_tab_overview, .toggle_window_decorations, - .toggle_slide_terminal, + .toggle_quick_terminal, .goto_tab, .inspector, .render_inspector, diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index dc535868e..9bbfad94e 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -379,7 +379,7 @@ pub fn performAction( // Unimplemented .close_all_windows, .toggle_split_zoom, - .toggle_slide_terminal, + .toggle_quick_terminal, .size_limit, .cell_size, .secure_input, diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 986b9e7c8..36d87ae3e 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -363,16 +363,25 @@ pub const Action = union(enum) { /// This only works on macOS, since this is a system API on macOS. toggle_secure_input: void, - /// Toggle the "slide" terminal. The slide terminal is a terminal that - /// slides in from some screen edge, usually the top. This is useful for - /// quick access to a terminal without having to open a new window or tab. + /// Toggle the "quick" terminal. The quick terminal is a terminal that + /// appears on demand from a keybinding, often sliding in from a screen + /// edge such as the top. This is useful for quick access to a terminal + /// without having to open a new window or tab. /// - /// The slide terminal is a singleton; only one instance can exist at a - /// time. + /// When the quick terminal loses focus, it disappears. The terminal state + /// is preserved between appearances, so you can always press the keybinding + /// to bring it back up. /// - /// See the various configurations for the slide terminal in the + /// Ths quick terminal has some limitations: + /// + /// - It is a singleton; only one instance can exist at a time. + /// - It does not support tabs. + /// - It will not be restored when the application is restarted + /// (for systems that support window restoration). + /// + /// See the various configurations for the quick terminal in the /// configuration file to customize its behavior. - toggle_slide_terminal: void, + toggle_quick_terminal: void, /// Quit ghostty. quit: void, @@ -393,7 +402,7 @@ pub const Action = union(enum) { /// crash: CrashThread, - pub const SlideTerminalPosition = enum { + pub const QuickTerminalPosition = enum { top, }; @@ -578,7 +587,7 @@ pub const Action = union(enum) { .reload_config, .close_all_windows, .quit, - .toggle_slide_terminal, + .toggle_quick_terminal, => .app, // These are app but can be special-cased in a surface context.