mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
close window action
This commit is contained in:
@ -764,6 +764,8 @@ fn keyCallback(
|
||||
}, .{ .instant = {} });
|
||||
win.app.wakeup();
|
||||
},
|
||||
|
||||
.close_window => win.window.setShouldClose(true),
|
||||
}
|
||||
|
||||
// Bindings always result in us ignoring the char if printable
|
||||
|
@ -159,9 +159,14 @@ pub const Config = struct {
|
||||
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .up, .mods = .{ .super = true } },
|
||||
.{ .key = .n, .mods = .{ .super = true } },
|
||||
.{ .new_window = {} },
|
||||
);
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .w, .mods = .{ .super = true } },
|
||||
.{ .close_window = {} },
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -134,8 +134,11 @@ pub const Action = union(enum) {
|
||||
/// Dev mode
|
||||
toggle_dev_mode: void,
|
||||
|
||||
/// Open a new terminal window.
|
||||
/// Open a new window
|
||||
new_window: void,
|
||||
|
||||
/// Close the current window
|
||||
close_window: void,
|
||||
};
|
||||
|
||||
/// Trigger is the associated key state that can trigger an action.
|
||||
|
Reference in New Issue
Block a user