API¶
Module contents¶
Gabbia: A Wayland kiosk.
- gabbia.run(cmd: str | list[str], config: Config | None = None) int¶
Runs Gabbia.
- Parameters:
cmd – The command/application to run.
config – The configuration. If
None, the defaultConfigwill be used.
- class gabbia.Config(*, keyboard_layout: str | None = <factory>, keyboard_options: str | None = <factory>, keyboard_variant: str | None = <factory>, keyboard_rate: int = <factory>, keyboard_delay: int = <factory>, allow_vt_change: bool = False, cursor_size: int = <factory>, cursor_theme: str = <factory>, screen: str = '', ftm: bool = True, full_ftm: bool = False, fullscreen_color: str = '#000', dim: bool = True, dim_color: str = '#000000cc', ignore_size: bool = False, ssd: bool = True, auto_terminate: bool = True, default_wayland_socket: bool = False, no_x: bool = False, log_level: int = 30, log_level_wlr: int = 30, log_wlr: bool = False)¶
Configuration of Gabbia.
All configuration options provide a valuable default, so it should be safe to run Gabbia with the default values.
- full_ftm: bool¶
Indicates if Gabbia should give access to the all views or to the currect, active view only. By default, it gives access to the active view, only.
Set to
Trueif you want to manage multiple applications via foreign toplevel management protocol.
- cursor_theme: str¶
The cursor theme.
Depends on the
XCURSOR_THEMEenvironment variable or uses ‘default’.
- keyboard_delay: int¶
Keyboard delay.
Depends on the
WLC_REPEAT_DELAYenvironment variable or uses600by default.
- keyboard_layout: str | None¶
Specifies the default keyboard layout.
Depends on the
XKB_DEFAULT_LAYOUTenvironment variable or is undefined by default.
- keyboard_options: str | None¶
Keyboard options.
Depends on the
XKB_DEFAULT_OPTIONSenvironment variable or is undefined by default.
- keyboard_rate: int¶
Keyboard rate.
Depends on the
WLC_REPEAT_RATEenvironment variable or uses25by default.
- keyboard_variant: str | None¶
Keyboard variant.
Depends on the
XKB_DEFAULT_VARIANTenvironment variable or is undefined by default.
- fullscreen_color: str¶
Sets the color of the fullscreen background if a view does not cover the whole output.
A hexadecimal value of 3, 6 or 8 characters. Although not enforced, it makes sense to use a non-transparent color.
- ignore_size: bool¶
Indicates if size hints should be ignored.
Can be used to ignore the preferred size of an application.
- auto_terminate: bool¶
Indicates if Gabbia should be terminated if no applications (or screens) left.
- default_wayland_socket: bool¶
Indicates if Gabbia should use the default Wayland socket
wayland-0.If
False(default), Gabbia tries to usewayland-1..wayland-32, otherwisewayland-0..wayland-32.
- log_level: int¶
Indicates the logging level.
It’s by default
logging.WARNING.
- log_level_wlr: int¶
Indicates the wlroots logging level.
It’s by default
logging.WARNING.