mirror of
https://git.sr.ht/~leon_plickat/wayneko
synced 2025-09-19 07:53:21 +02:00
add --layer flag
This commit is contained in:
parent
ab5d2cb726
commit
b48594f150
2 changed files with 27 additions and 1 deletions
11
wayneko.1
11
wayneko.1
|
@ -16,6 +16,7 @@ wayneko \- Neko on Wayland
|
|||
.OP \-\-background\-colour 0xRRGGBB[AA]
|
||||
.OP \-\-outline\-colour 0xRRGGBB[AA]
|
||||
.OP \-\-type neko|inu|random
|
||||
.OP \-\-layer background|bottom|top|overlay
|
||||
.OP \-\-follow\-pointer true|false
|
||||
.OP \-\-survive\-close
|
||||
.YS
|
||||
|
@ -59,6 +60,16 @@ This option lets you choose between neko and her friend inu.
|
|||
.RE
|
||||
.
|
||||
.P
|
||||
\fB\-\-layer\fR \fBbackground\fR|\fBbottom\fR|\fBtop\fR|\fBoverlay\fR
|
||||
.RS
|
||||
Set the layer for the surface.
|
||||
Defaults to bottom.
|
||||
Bottom is typically beneath regular windows and top above them.
|
||||
Overlay is usually displayed even over fullscreen windows.
|
||||
Background may conflict with wallpaper clients.
|
||||
.RE
|
||||
.
|
||||
.P
|
||||
\fB\-\-follow\-pointer\fR \fBtrue\fR|\fBfalse\fR
|
||||
.RS
|
||||
Set whether neko follows the pointer when it approaches the bottom of the output
|
||||
|
|
17
wayneko.c
17
wayneko.c
|
@ -31,6 +31,8 @@ const char usage[] =
|
|||
" --background-colour 0xRRGGBB[AA]\n"
|
||||
" --outline-colour 0xRRGGBB[AA]\n"
|
||||
" --type neko|inu|random\n"
|
||||
" --layer background|bottom|top|overlay\n"
|
||||
" --follow-pointer true|false\n"
|
||||
" --survive-close\n"
|
||||
"\n";
|
||||
|
||||
|
@ -73,6 +75,7 @@ enum Neko current_neko = NEKO_STARE;
|
|||
enum Type type = NEKO;
|
||||
bool follow_pointer = true;
|
||||
bool recreate_surface_on_close = false;
|
||||
enum zwlr_layer_shell_v1_layer layer = ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM;
|
||||
|
||||
struct Seat
|
||||
{
|
||||
|
@ -1097,7 +1100,7 @@ static void surface_create (void)
|
|||
layer_shell,
|
||||
surface.wl_surface,
|
||||
NULL,
|
||||
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM,
|
||||
layer,
|
||||
"wayneko"
|
||||
);
|
||||
|
||||
|
@ -1310,6 +1313,18 @@ int main (int argc, char *argv[])
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else if ( strcmp(argv[i], "--layer") == 0 )
|
||||
{
|
||||
const char *a = get_argument(argc, argv, &i);
|
||||
if ( strcmp(a, "background") == 0 )
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND;
|
||||
else if ( strcmp(a, "bottom") == 0 )
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM;
|
||||
else if ( strcmp(a, "top") == 0 )
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_TOP;
|
||||
else if ( strcmp(a, "overlay") == 0 )
|
||||
layer = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unknown option: %s\n", argv[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue