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 default Config will 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.

screen: str

Indicates the screen Gabbia should utilize.

Uses the first screen by default.

ftm: bool

Indicates if the foreign toplevel management protocol should be supported.

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 True if you want to manage multiple applications via foreign toplevel management protocol.

allow_vt_change: bool

Indicates if Gabbia should allow a switch to another virtual terminal.

cursor_size: int

The cursor size.

Depends on the XCURSOR_SIZE environment variable or uses 24.

cursor_theme: str

The cursor theme.

Depends on the XCURSOR_THEME environment variable or uses ‘default’.

keyboard_delay: int

Keyboard delay.

Depends on the WLC_REPEAT_DELAY environment variable or uses 600 by default.

keyboard_layout: str | None

Specifies the default keyboard layout.

Depends on the XKB_DEFAULT_LAYOUT environment variable or is undefined by default.

keyboard_options: str | None

Keyboard options.

Depends on the XKB_DEFAULT_OPTIONS environment variable or is undefined by default.

keyboard_rate: int

Keyboard rate.

Depends on the WLC_REPEAT_RATE environment variable or uses 25 by default.

keyboard_variant: str | None

Keyboard variant.

Depends on the XKB_DEFAULT_VARIANT environment 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.

dim: bool

Indicates if the non-active view should be dimmed.

dim_color: str

Sets the dimming color.

A hexadecimal value of 3, 6 or 8 characters.

ignore_size: bool

Indicates if size hints should be ignored.

Can be used to ignore the preferred size of an application.

ssd: bool

Indicates if server side decorations should be enabled.

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 use wayland-1 .. wayland-32, otherwise wayland-0 .. wayland-32.

no_x: bool

Indicates that XWayland should not be supported even if available.

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.

log_wlr: bool

Indicates if wlroots logging should be enabled.