Add exit_river keybinding

Recently, river removed the hardcoded Ctrl+Alt Delete keybinding that
exits river and replaces it with a new `exit_session` request. This adds
support for that request via the new `exit_session` bind. We also added
3 hardcoded default keybinds to: exit river, reload the config, and
open foot. This way, if the config fails to load or is missing, you
should still be able to try reload. I guess you're still SOL if you have
at least one keybind and it's not reload_config, but you do what you can
do.
This commit is contained in:
Ben Buhse 2026-03-06 09:21:07 -06:00
commit 678d0563ed
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
11 changed files with 293 additions and 108 deletions

View file

@ -22,6 +22,7 @@ pub const Command = union(enum) {
reload_config,
toggle_fullscreen,
close_window,
exit_river,
// Tag management
set_output_tags: u32,
set_window_tags: u32,
@ -70,6 +71,7 @@ pub const Command = union(enum) {
.reload_config,
.toggle_fullscreen,
.close_window,
.exit_river,
.set_output_tags,
.set_window_tags,
.toggle_output_tags,
@ -246,6 +248,7 @@ const XkbBinding = struct {
window.river_window_v1.close();
}
},
.exit_river => context.wm.river_window_manager_v1.exitSession(),
.set_output_tags => |tags| {
const seat = first_seat orelse return;
const output = seat.focused_output orelse return;