Window#

class ignis.widgets.Widget.Window(*args: Any, **kwargs: Any)#

Bases: Gtk.Window.

The top-level widget that contains everything.

Properties:
  • namespace (str, required, read-only): The name of the window, used to access it from the CLI and ignisApp. It must be unique. It is also the name of the layer.

  • monitor (int | None, optional, read-write): The monitor number on which to display the window. Raises MonitorNotFoundError if the monitor with the given ID is not found.

  • anchor (list[str] | None, optional, read-write): A list of anchors. If the list is empty, the window will be centered on the screen. Default: [].

  • exclusivity (str, optional, read-write): Defines how the compositor should avoid occluding a window area with other surfaces/layers. Default: "normal".

  • layer (str, optional, read-write): The layer of the surface. Default: "top".

  • kb_mode (str, optional, read-write): Whether the window should receive keyboard events from the compositor. Default: "none".

  • popup (bool, optional, read-write): Whether the window should close on ESC. Works only if kb_mode is set to "exclusive" or "on_demand".

  • input_width (int, optional, read-write): The width at which the window can receive keyboard and mouse input. Must be > 0.

  • input_height (int, optional, read-write): The width at which the window can receive keyboard and mouse input. Must be > 0.

Anchors:
  • "bottom"

  • "left"

  • "right"

  • "top"

Exclusivity:
  • "ignore" : Completely ignore other surfaces. This allows you to overlap other surfaces.

  • "normal" : The window will have no extra space and do not overlap other surfaces.

  • "exclusive" : The compositor will reserve extra space for this window.

Layer:
  • "background"

  • "bottom"

  • "top"

  • "overlay"

Keyboard mode:
  • "none" : This window should not receive keyboard events.

  • "exclusive" : This window should have exclusive focus if it is on the top or overlay layer.

  • "on_demand" : The user should be able to focus and unfocus this window.

Raises:
Widget.Window(
    namespace="example_window",
    child=Widget.Label(label='heh'),
    monitor=0,
    anchor=["top", "right"],
    exclusive=True,
    layer="top",
    kb_mode="none",
    popup=False
)