summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-10-14 17:02:04 +0100
committerPhil Jones <philj56@gmail.com>2022-10-14 17:02:39 +0100
commitf6481fd8baf793de17cb071e17ef7208f9db40c0 (patch)
tree1465581c12b3ae349139a47259078a915a2caefe /src/main.c
parent2fd61357ad1ddb16cbba9c405ca92021dca19b65 (diff)
Add --exclusive-zone option.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
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> Name of output to display window on.\n"
" --scale <true|false> Follow the output's scale factor.\n"
" --anchor <position> Location on screen to anchor window.\n"
+" --exclusive-zone <-1|px|%> Exclusive zone size, or -1 for none.\n"
" --margin-top <px|%> Offset from top of screen.\n"
" --margin-bottom <px|%> Offset from bottom of screen.\n"
" --margin-left <px|%> 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,