mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-24 08:15:21 +00:00
Close other tabs feature on Mac.
Supporting command line, file menu and keybindings. Default mac shortcut of `super + alt + o` (other) Not able to test on Linux so excluding `close_other_tabs` from `gtk` for now make a default short cut for close other tabs
This commit is contained in:
committed by
Mitchell Hashimoto
parent
13425b4881
commit
c26323d697
@@ -558,6 +558,12 @@ pub const Action = union(enum) {
|
||||
/// of the `confirm-close-surface` configuration setting.
|
||||
close_tab,
|
||||
|
||||
/// Close all tabs other than the currently focused one within the same
|
||||
/// window.
|
||||
///
|
||||
/// Only available on macOS currently.
|
||||
close_other_tabs,
|
||||
|
||||
/// Close the current window and all tabs and splits therein.
|
||||
///
|
||||
/// This might trigger a close confirmation popup, depending on the value
|
||||
@@ -1052,6 +1058,7 @@ pub const Action = union(enum) {
|
||||
.write_selection_file,
|
||||
.close_surface,
|
||||
.close_tab,
|
||||
.close_other_tabs,
|
||||
.close_window,
|
||||
.toggle_maximize,
|
||||
.toggle_fullscreen,
|
||||
|
||||
@@ -375,6 +375,12 @@ fn actionCommands(action: Action.Key) []const Command {
|
||||
.description = "Show the on-screen keyboard if present.",
|
||||
}},
|
||||
|
||||
.close_other_tabs => comptime &.{.{
|
||||
.action = .close_other_tabs,
|
||||
.title = "Close Other Tabs",
|
||||
.description = "Close all tabs in this window except the current one.",
|
||||
}},
|
||||
|
||||
.open_config => comptime &.{.{
|
||||
.action = .open_config,
|
||||
.title = "Open Config",
|
||||
|
||||
Reference in New Issue
Block a user