Add basic input configuration

This commit is contained in:
Leon Henrik Plickat
2021-06-04 05:51:15 +02:00
committed by Isaac Freund
parent cab947b3a3
commit 833248e805
7 changed files with 522 additions and 3 deletions

View File

@ -57,6 +57,7 @@ const str_to_impl_fn = [_]struct {
.{ .name = "focus-follows-cursor", .impl = @import("command/focus_follows_cursor.zig").focusFollowsCursor },
.{ .name = "focus-output", .impl = @import("command/focus_output.zig").focusOutput },
.{ .name = "focus-view", .impl = @import("command/focus_view.zig").focusView },
.{ .name = "input", .impl = @import("command/input.zig").input },
.{ .name = "map", .impl = @import("command/map.zig").map },
.{ .name = "map-pointer", .impl = @import("command/map.zig").mapPointer },
.{ .name = "mod-layout-value", .impl = @import("command/layout.zig").modLayoutValue },
@ -90,6 +91,7 @@ pub const Error = error{
NotEnoughArguments,
TooManyArguments,
Overflow,
InvalidButton,
InvalidCharacter,
InvalidDirection,
InvalidPhysicalDirection,
@ -134,6 +136,7 @@ pub fn errToMsg(err: Error) [:0]const u8 {
Error.NotEnoughArguments => "not enough arguments",
Error.TooManyArguments => "too many arguments",
Error.Overflow => "value out of bounds",
Error.InvalidButton => "invalid button",
Error.InvalidCharacter => "invalid character in argument",
Error.InvalidDirection => "invalid direction. Must be 'next' or 'previous'",
Error.InvalidPhysicalDirection => "invalid direction. Must be 'up', 'down', 'left' or 'right'",