Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
map: allow creating mappings with no modifiers
doc/riverctl.1 | 3 +++
river/command/map.zig | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/doc/riverctl.1 b/doc/riverctl.1
index 530c8c9..4b8e49d 100644
--- a/doc/riverctl.1
+++ b/doc/riverctl.1
@@ -156,6 +156,9 @@ for a list of special key names.
.I command
can be any of the above commands.
+A mapping without modifiers can be created by passing an empty string as the
+modifiers argument.
+
.SH EXAMPLES
Bind bemenu-run to Super+P:
diff --git a/river/command/map.zig b/river/command/map.zig
index 3837a6f..991e651 100644
--- a/river/command/map.zig
+++ b/river/command/map.zig
@@ -27,6 +27,7 @@ const modifier_names = [_]struct {
name: []const u8,
modifier: u32,
}{
+ .{ .name = "", .modifier = 0 },
.{ .name = "Shift", .modifier = c.WLR_MODIFIER_SHIFT },
.{ .name = "Lock", .modifier = c.WLR_MODIFIER_CAPS },
.{ .name = "Control", .modifier = c.WLR_MODIFIER_CTRL },
@@ -40,7 +41,7 @@ const modifier_names = [_]struct {
/// Create a new mapping for a given mode
///
/// Example:
-/// map normal Mod4|Shift Return spawn alacritty
+/// map normal Mod4+Shift Return spawn alacritty
pub fn map(
allocator: *std.mem.Allocator,
seat: *Seat,