diff --git a/include/ghostty.h b/include/ghostty.h index e66ce08ea..c64ce0160 100644 --- a/include/ghostty.h +++ b/include/ghostty.h @@ -508,6 +508,7 @@ typedef enum { GHOSTTY_ACTION_TOGGLE_TAB_OVERVIEW, GHOSTTY_ACTION_TOGGLE_WINDOW_DECORATIONS, GHOSTTY_ACTION_TOGGLE_QUICK_TERMINAL, + GHOSTTY_ACTION_TOGGLE_VISIBILITY, GHOSTTY_ACTION_GOTO_TAB, GHOSTTY_ACTION_GOTO_SPLIT, GHOSTTY_ACTION_RESIZE_SPLIT, diff --git a/src/App.zig b/src/App.zig index 5922528ab..7e82bf007 100644 --- a/src/App.zig +++ b/src/App.zig @@ -325,6 +325,7 @@ pub fn performAction( .reload_config => try self.reloadConfig(rt_app), .close_all_windows => try rt_app.performAction(.app, .close_all_windows, {}), .toggle_quick_terminal => try rt_app.performAction(.app, .toggle_quick_terminal, {}), + .toggle_visibility => try rt_app.performAction(.app, .toggle_visibility, {}), } } diff --git a/src/apprt/action.zig b/src/apprt/action.zig index 2f7616bc4..6543d7630 100644 --- a/src/apprt/action.zig +++ b/src/apprt/action.zig @@ -96,6 +96,9 @@ pub const Action = union(Key) { /// Toggle the quick terminal in or out. toggle_quick_terminal, + /// Toggle the quick terminal in or out. + toggle_visibility, + /// Jump to a specific tab. Must handle the scenario that the tab /// value is invalid. goto_tab: GotoTab, @@ -180,6 +183,7 @@ pub const Action = union(Key) { toggle_tab_overview, toggle_window_decorations, toggle_quick_terminal, + toggle_visibility, goto_tab, goto_split, resize_split, diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index 87314c0e1..948b38a29 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -197,6 +197,7 @@ pub const App = struct { .toggle_tab_overview, .toggle_window_decorations, .toggle_quick_terminal, + .toggle_visibility, .goto_tab, .inspector, .render_inspector, diff --git a/src/apprt/gtk/App.zig b/src/apprt/gtk/App.zig index 8e683829c..2e0bbad84 100644 --- a/src/apprt/gtk/App.zig +++ b/src/apprt/gtk/App.zig @@ -389,6 +389,7 @@ pub fn performAction( .close_all_windows, .toggle_split_zoom, .toggle_quick_terminal, + .toggle_visibility, .size_limit, .cell_size, .secure_input, diff --git a/src/input/Binding.zig b/src/input/Binding.zig index da87ac230..e10ef3b1f 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -387,6 +387,9 @@ pub const Action = union(enum) { /// configuration file to customize its behavior. toggle_quick_terminal: void, + /// Toggle visibility of all windows + toggle_visibility: void, + /// Quit ghostty. quit: void, @@ -588,6 +591,7 @@ pub const Action = union(enum) { .close_all_windows, .quit, .toggle_quick_terminal, + .toggle_visibility, => .app, // These are app but can be special-cased in a surface context.