mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-28 03:26:28 +00:00
core: slide terminal keybinding action
This commit is contained in:
@@ -3856,6 +3856,12 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
.toggle,
|
||||
),
|
||||
|
||||
.toggle_slide_terminal => {
|
||||
if (@hasDecl(apprt.Surface, "toggleSlideTerminal")) {
|
||||
self.rt_surface.toggleSlideTerminal();
|
||||
} else log.warn("runtime doesn't implement toggleSlideTerminal", .{});
|
||||
},
|
||||
|
||||
.select_all => {
|
||||
const sel = self.io.terminal.screen.selectAll();
|
||||
if (sel) |s| {
|
||||
|
||||
@@ -363,6 +363,17 @@ 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.
|
||||
///
|
||||
/// The slide terminal is a singleton; only one instance can exist at a
|
||||
/// time.
|
||||
///
|
||||
/// See the various configurations for the slide terminal in the
|
||||
/// configuration file to customize its behavior.
|
||||
toggle_slide_terminal: void,
|
||||
|
||||
/// Quit ghostty.
|
||||
quit: void,
|
||||
|
||||
@@ -382,6 +393,10 @@ pub const Action = union(enum) {
|
||||
///
|
||||
crash: CrashThread,
|
||||
|
||||
pub const SlideTerminalPosition = enum {
|
||||
top,
|
||||
};
|
||||
|
||||
pub const CrashThread = enum {
|
||||
main,
|
||||
io,
|
||||
|
||||
Reference in New Issue
Block a user