Skip to content

Widget: Template

Dan edited this page Feb 13, 2022 · 4 revisions

The widget type yasb.example.ExampleWidget serves as an example widget for Yasb.

Config

type: "yasb.example.ExampleWidget"

Options

option type default description
some_field some_type some_value Some description.
callbacks dict[str] see callbacks Left, middle and right-click widget behaviour.

Callbacks

Default Callbacks
callback type default description
on_left str "do_nothing" Action triggered when the widget is left-clicked.
on_middle str "do_nothing" Action triggered when the widget is middle-clicked.
on_right str "do_nothing" Action triggered when the widget is right-clicked.
Available Callbacks
  • "do_nothing" - does nothing

Example:

example-widget:
    type: "yasb.example.ExampleWidget"
    options:
        ...

CSS Selectors

  • .clock-widget
    • .label
    • .label-alt