Add change_ratio keybind
This commit is contained in:
parent
4e02a07bf1
commit
365c000b6e
5 changed files with 49 additions and 16 deletions
|
|
@ -9,8 +9,7 @@ pub const Command = union(enum) {
|
|||
focus_next,
|
||||
focus_prev,
|
||||
zoom,
|
||||
// ratio_up, // TODO
|
||||
// ratio_down, // TODO
|
||||
change_ratio: f32,
|
||||
// reload_config, // TODO
|
||||
toggle_fullscreen,
|
||||
close_window,
|
||||
|
|
@ -128,6 +127,12 @@ const XkbBinding = struct {
|
|||
};
|
||||
current_focus.link.swapWith(&first_window.link);
|
||||
},
|
||||
.change_ratio => |diff| {
|
||||
const new_ratio = context.wm.primary_ratio + diff;
|
||||
if (new_ratio >= 0.10 and new_ratio <= 0.90) {
|
||||
context.wm.pending_manage.primary_ratio = context.wm.primary_ratio + diff;
|
||||
}
|
||||
},
|
||||
.toggle_fullscreen => {
|
||||
const seat = context.wm.seats.first() orelse return;
|
||||
const window = seat.focused orelse return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue