mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-19 11:31:19 +00:00
gtk: add support for resizing splits via keybinds
This adds support for resizing splits via keybinds to the GTK runtime. Code is straightforward. I couldn't see a way to do it without keeping track of the orientation of the splits, but I think that's fine.
This commit is contained in:
@@ -977,6 +977,28 @@ pub fn default(alloc_gpa: Allocator) Allocator.Error!Config {
|
||||
.{ .goto_split = .right },
|
||||
);
|
||||
|
||||
// Resizing splits
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .up, .mods = .{ .super = true, .ctrl = true, .shift = true } },
|
||||
.{ .resize_split = .{ .up, 10 } },
|
||||
);
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .down, .mods = .{ .super = true, .ctrl = true, .shift = true } },
|
||||
.{ .resize_split = .{ .down, 10 } },
|
||||
);
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .left, .mods = .{ .super = true, .ctrl = true, .shift = true } },
|
||||
.{ .resize_split = .{ .left, 10 } },
|
||||
);
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
.{ .key = .right, .mods = .{ .super = true, .ctrl = true, .shift = true } },
|
||||
.{ .resize_split = .{ .right, 10 } },
|
||||
);
|
||||
|
||||
// Viewport scrolling
|
||||
try result.keybind.set.put(
|
||||
alloc,
|
||||
|
||||
Reference in New Issue
Block a user