Add change_ratio keybind

This commit is contained in:
Ben Buhse 2026-01-30 21:47:16 -06:00
commit 365c000b6e
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
5 changed files with 49 additions and 16 deletions

View file

@ -322,6 +322,17 @@ fn loadKeybindsChildBlock(config: *Config, parser: *kdl.Parser) !void {
.zoom => {
break :sw .zoom;
},
.change_ratio => {
const diff_str = utils.stripQuotes(node.arg(parser, 2) orelse {
logWarnMissingNodeArg(name, "diff");
continue;
});
const diff = fmt.parseFloat(f32, diff_str) catch {
logWarnInvalidNodeArg(name, diff_str);
continue;
};
break :sw .{ .change_ratio = diff };
},
.toggle_fullscreen => {
break :sw .toggle_fullscreen;
},