Panel: fix height, exclusive zone flag, better helptext

This commit is contained in:
Robin Carlier
2024-11-24 10:38:51 +01:00
parent 00d67a6557
commit 2005069f90
6 changed files with 42 additions and 10 deletions

View File

@@ -44,24 +44,28 @@ The number of columns shown in the panel. Ignored for background and horizontal
type=int
default=0
Request a given top margin to the compositor.
Only works on a Wayland compositor that supports the wlr layer shell protocol.
--margin-left
type=int
default=0
Request a given left margin to the compositor.
Only works on a Wayland compositor that supports the wlr layer shell protocol.
--margin-bottom
type=int
default=0
Request a given bottom margin to the compositor.
Only works on a Wayland compositor that supports the wlr layer shell protocol.
--margin-right
type=int
default=0
Request a given right margin to the compositor.
Only works on a Wayland compositor that supports the wlr layer shell protocol.
--edge
@@ -72,14 +76,15 @@ Which edge of the screen to place the panel on. Note that some window managers
The value :code:`background` means make the panel the "desktop wallpaper". This
is only supported on Wayland, not X11 and note that when using sway if you set
a background in your sway config it will cover the background drawn using this
kitten. The value :code:`none` allow free placement of the window
when combined with explicit margin parameters.
kitten.
The value :code:`none` anchors the panel to the top left corner by default
and the panel should be placed using margins parameters.
--layer
choices=background,bottom,top,overlay
default=bottom
On a compositor that supports the wlr layer shell protocol, specifies the layer
On a Wayland compositor that supports the wlr layer shell protocol, specifies the layer
on which the panel should be drawn. This parameter is ignored and set to
:code:`background` if :option:`--edge` is set to :code:`background`.
@@ -120,6 +125,22 @@ On a Wayland compositor that supports the wlr layer shell protocol, specify the
interactivity with the panel. Please refer to the wlr layer shell protocol documentation for more details.
--exclusive-zone
type=int
default=-1
On a Wayland compositor that supports the wlr layer shell protocol, request a given exclusive zone for the panel.
Please refer to the wlr layer shell documentation for more details on the meaning of exclusive and its value.
If :option:`--edge` is set to anything else than :code:`none`, this flag will not have any effect unless
the flag :option:`--override-exclusive-zone` is also set.
If :option:`--edge` is set to :code:`background`, this option has no effect.
--override-exclusive-zone
type=bool-set
On a Wayland compositor that supports the wlr layer shell protocol, override the default exclusive zone.
This has effect only if :option:`--edge` is set to :code:`top`, :code:`left`, :code:`bottom` or :code:`right`.
--debug-rendering
type=bool-set
For internal debugging use.
@@ -218,6 +239,8 @@ def layer_shell_config(opts: PanelCLIOptions) -> LayerShellConfig:
requested_bottom_margin=max(0, opts.margin_bottom),
requested_right_margin=max(0, opts.margin_right),
focus_policy=focus_policy,
requested_exclusive_zone=opts.exclusive_zone,
override_exclusive_zone=opts.override_exclusive_zone,
output_name=opts.output_name or '')