aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-06-13 13:32:35 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-06-13 13:32:35 +0200
commitc2d32a44c3cb4458817fa029553cec42a994e057 (patch)
tree936937a565cdf4d5c41de464de7581d0c997781d
parent4f029aa5c7c484f3b74cf3b0b0a3f3800ef08026 (diff)
downloadriver-c2d32a44c3cb4458817fa029553cec42a994e057.tar.gz
river-c2d32a44c3cb4458817fa029553cec42a994e057.tar.xz
command: add view_padding option
-rw-r--r--doc/riverctl.12
-rw-r--r--river/command/set_option.zig5
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/riverctl.1 b/doc/riverctl.1
index 0fa8dbb..cd267ae 100644
--- a/doc/riverctl.1
+++ b/doc/riverctl.1
@@ -175,6 +175,8 @@ border_color_focused (RGB/RGBA hex code)
border_color_unfocused (RGB/RGBA hex code)
.IP \(bu
outer_padding (non-negative integer)
+.IP \(bu
+view_padding (non-negative integer)
.SH EXAMPLES
diff --git a/river/command/set_option.zig b/river/command/set_option.zig
index b3fb110..6d7456e 100644
--- a/river/command/set_option.zig
+++ b/river/command/set_option.zig
@@ -21,11 +21,12 @@ const std = @import("std");
const Error = @import("../command.zig").Error;
const Seat = @import("../Seat.zig");
-pub const Option = enum {
+const Option = enum {
border_width,
border_color_focused,
border_color_unfocused,
outer_padding,
+ view_padding,
};
/// Set option to a specified value.
@@ -40,7 +41,6 @@ pub fn setOption(
const config = &seat.input_manager.server.config;
- // Parse option and value.
const option = std.meta.stringToEnum(Option, args[1]) orelse return Error.UnknownOption;
// Assign value to option.
@@ -49,6 +49,7 @@ pub fn setOption(
.border_color_focused => config.border_color_focused = try parseRgba(args[2]),
.border_color_unfocused => config.border_color_unfocused = try parseRgba(args[2]),
.outer_padding => config.outer_padding = try std.fmt.parseInt(u32, args[2], 10),
+ .view_padding => config.view_padding = try std.fmt.parseInt(u32, args[2], 10),
}
// 'Refresh' focused output to display the desired changes.