From f6481fd8baf793de17cb071e17ef7208f9db40c0 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Fri, 14 Oct 2022 17:02:04 +0100 Subject: Add --exclusive-zone option. --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9c14cda..212211d 100644 --- a/src/main.c +++ b/src/main.c @@ -816,6 +816,7 @@ static void usage() " --output Name of output to display window on.\n" " --scale Follow the output's scale factor.\n" " --anchor Location on screen to anchor window.\n" +" --exclusive-zone <-1|px|%> Exclusive zone size, or -1 for none.\n" " --margin-top Offset from top of screen.\n" " --margin-bottom Offset from bottom of screen.\n" " --margin-left Offset from left of screen.\n" @@ -848,6 +849,7 @@ const struct option long_options[] = { {"config", required_argument, NULL, 'c'}, {"include", required_argument, NULL, 0}, {"anchor", required_argument, NULL, 0}, + {"exclusive-zone", required_argument, NULL, 0}, {"background-color", required_argument, NULL, 0}, {"corner-radius", required_argument, NULL, 0}, {"font", required_argument, NULL, 0}, @@ -1022,6 +1024,7 @@ int main(int argc, char *argv[]) .scale = 1, .width = 1280, .height = 720, + .exclusive_zone = -1, .entry = { .font_name = "Sans", .font_size = 24, @@ -1321,7 +1324,7 @@ int main(int argc, char *argv[]) tofi.anchor); zwlr_layer_surface_v1_set_exclusive_zone( tofi.window.zwlr_layer_surface, - -1); + tofi.window.exclusive_zone); zwlr_layer_surface_v1_set_size( tofi.window.zwlr_layer_surface, tofi.window.width / tofi.window.scale, -- cgit v1.2.3