command: add background_color option

This is trivial to support and allows basic customization without
running a layer-shell program such as swaybg. This is especially useful
in low memory situations.
This commit is contained in:
Isaac Freund
2020-06-19 18:44:28 +02:00
parent 2ef8261493
commit ebc661f4a7
4 changed files with 9 additions and 2 deletions

View File

@ -22,6 +22,7 @@ const Error = @import("../command.zig").Error;
const Seat = @import("../Seat.zig");
const Option = enum {
background_color,
border_width,
border_color_focused,
border_color_unfocused,
@ -45,6 +46,7 @@ pub fn setOption(
// Assign value to option.
switch (option) {
.background_color => config.background_color = try parseRgba(args[2]),
.border_width => config.border_width = try std.fmt.parseInt(u32, args[2], 10),
.border_color_focused => config.border_color_focused = try parseRgba(args[2]),
.border_color_unfocused => config.border_color_unfocused = try parseRgba(args[2]),