Go to index / Go to protocols

treeland_personalization_manager_v1 ↗

personalization and theming for treeland

Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.

treeland_personalization_manager_v1
treeland_personalization_manager_v1

Version 2
Compositor Support
Version 1
treeland 0.8.0

personalization manager

This interface allows a client to customize display effects.

treeland_personalization_manager_v1
request get_window_context(
    id: new_id<treeland_personalization_window_context_v1>,
    surface: object<wl_surface>,
)

    get personalization window context

    set window background, shadow based on context

    treeland_personalization_manager_v1
    request get_cursor_context(
        id: new_id<treeland_personalization_cursor_context_v1>,
    )

      create a cursor customization context

      Create a cursor customization context for configuring the system cursor.

      treeland_personalization_manager_v1
      request get_font_context(
          id: new_id<treeland_personalization_font_context_v1>,
      )

        custom treeland and window global font context

        custom treeland and window global font context

        treeland_personalization_manager_v1
        request get_appearance_context(
            id: new_id<treeland_personalization_appearance_context_v1>,
        )

          custom treeland window global settings context

          custom user treeland window appearance global

          treeland_personalization_manager_v1
          request destroy()
          DestructorAvailable since version 2

            destroy treeland_personalization_manager_v1 object

            treeland_personalization_manager_v1
            treeland_personalization_cursor_context_v1

            Version 1

            client custom cursor context

            This interface allows a client personalization cursor.

            treeland_personalization_cursor_context_v1
            request set_theme(
                name: string,
            )
            • name — cursor theme name

            set system cursor theme

            Set the system cursor theme name.

            treeland_personalization_cursor_context_v1
            request get_theme()

              get system cursor theme

              Query the current system cursor theme name. The compositor will respond with a theme event.

              treeland_personalization_cursor_context_v1
              request set_size(
                  size: uint,
              )
              • size — cursor size

              set system cursor size

              Set the system cursor size.

              treeland_personalization_cursor_context_v1
              request get_size()

                get system cursor size

                Query the current system cursor size. The compositor will respond with a size event.

                treeland_personalization_cursor_context_v1
                request commit()

                  commit pending cursor configuration

                  Apply pending cursor configuration changes.

                  treeland_personalization_cursor_context_v1
                  request destroy()
                  Destructor

                    destroy the context object

                    Destroy the context object.

                    treeland_personalization_cursor_context_v1
                    event verfity(
                        success: int,
                    )
                    • success — check whether the configuration is successful

                    verfity event

                    Send this signal after commit cursor configure.

                    treeland_personalization_cursor_context_v1
                    event theme(
                        name: string,
                    )
                    • name — cursor theme name

                    cursor theme changed event

                    Sent when the system cursor theme has changed.

                    treeland_personalization_cursor_context_v1
                    event size(
                        size: uint,
                    )
                    • size — cursor size

                    cursor size changed event

                    Sent when the system cursor size has changed.

                    treeland_personalization_manager_v1
                    treeland_personalization_window_context_v1

                    Version 1

                    per-window personalization context

                    This interface allows a client to customize per-window visual properties including background blend mode, round corner radius, shadow, border, and titlebar visibility.

                    treeland_personalization_window_context_v1
                    enum blend_mode {
                        transparent = 0,
                        wallpaper = 1,
                        blur = 2,
                    }
                    • transparent — Normal blend mode, just composite over background with alpha channel
                    • wallpaper — Composite window over wallpaper
                    • blur — Blur the content of the window background

                    window blend mode

                    Window blend mode defines how compositor composite window's surface over other surfaces.

                    treeland_personalization_window_context_v1
                    request set_blend_mode(
                        mode: int<blend_mode>,
                    )
                    • mode — the blend mode to apply

                    set window background blend mode

                    Set window background blend mode

                    treeland_personalization_window_context_v1
                    request set_round_corner_radius(
                        radius: int,
                    )
                    • radius — window round corner radius in pixels

                    set window round corner radius

                    This request will set window round corner radius, invoking this request means user want to manage window round corner radius by itself. If not invoked, window round corner radius will be decided by compositor.

                    treeland_personalization_window_context_v1
                    request set_shadow(
                        radius: int,
                        offset_x: int,
                        offset_y: int,
                        r: int,
                        g: int,
                        b: int,
                        a: int,
                    )
                    • radius — shadow radius, -1 for system default, 0 to disable
                    • offset_x — shadow x offset
                    • offset_y — shadow y offset
                    • r — shadow color red component (0-255)
                    • g — shadow color green component (0-255)
                    • b — shadow color blue component (0-255)
                    • a — shadow color alpha component (0-255)

                    set window shadow

                    Set window shadow's radius, offset and color. When enabled, the client manages the window shadow itself.

                    • radius = -1: enable shadow with system default parameters

                    • radius = 0: disable shadow completely

                    • radius > 0: enable shadow with custom parameters If not invoked, the compositor uses its default behavior.

                    treeland_personalization_window_context_v1
                    request set_border(
                        width: int,
                        r: int,
                        g: int,
                        b: int,
                        a: int,
                    )
                    • width — border width in pixels, -1 for system default, 0 to disable
                    • r — border color red component (0-255)
                    • g — border color green component (0-255)
                    • b — border color blue component (0-255)
                    • a — border color alpha component (0-255)

                    set window border

                    Set window border width and color. When enabled, the client manages the window border itself.

                    • width = -1: enable border with system default parameters

                    • width = 0: disable border completely

                    • width > 0: enable border with custom parameters If not invoked, the compositor uses its default behavior.

                    treeland_personalization_window_context_v1
                    enum enable_mode {
                        enable = 0,
                        disable = 1,
                    }
                    • enable — force enable titlebar
                    • disable — force disable titlebar

                    window enable mode

                    Set window enable mode

                    treeland_personalization_window_context_v1
                    request set_titlebar(
                        mode: int<enable_mode>,
                    )
                    • mode — the titlebar enable mode

                    set if system titlebar is enabled

                    Set system titlebar state.

                    • mode = enable: force show the system titlebar

                    • mode = disable: force hide the system titlebar Once set, the compositor will not use its own default behavior for the titlebar. If not invoked, the compositor uses its default behavior.

                    treeland_personalization_window_context_v1
                    request destroy()
                    Destructor

                      destroy the context object

                      Destroy the context object.

                      treeland_personalization_manager_v1
                      treeland_personalization_font_context_v1

                      Version 1

                      global font settings context

                      This interface allows a client to configure global font settings including the general font, monospace font, and font size.

                      treeland_personalization_font_context_v1
                      event font(
                          font_name: string,
                      )
                      • font_name — font name

                      font event

                      Send this signal after setting the system font.

                      treeland_personalization_font_context_v1
                      event monospace_font(
                          font_name: string,
                      )
                      • font_name — monospace font name

                      monospace font event

                      Send this signal after setting the system monospace font.

                      treeland_personalization_font_context_v1
                      event font_size(
                          font_size: uint,
                      )
                      • font_size — font size

                      font size

                      Send this signal after setting the system font size.

                      treeland_personalization_font_context_v1
                      request set_font_size(
                          size: uint,
                      )
                      • size — font size

                      set system font size

                      Set the system font size

                      treeland_personalization_font_context_v1
                      request get_font_size()

                        get system font size

                        Get the system font size

                        treeland_personalization_font_context_v1
                        request set_font(
                            font_name: string,
                        )
                        • font_name — font name

                        set system font

                        Set the system font

                        treeland_personalization_font_context_v1
                        request get_font()

                          get system font

                          Get the system font

                          treeland_personalization_font_context_v1
                          request set_monospace_font(
                              font_name: string,
                          )
                          • font_name — monospace font name

                          set system monospace font

                          Set the system monospace font

                          treeland_personalization_font_context_v1
                          request get_monospace_font()

                            get system monospace font

                            Get the system monospace font

                            treeland_personalization_font_context_v1
                            request destroy()
                            Destructor

                              destroy the context object

                              Destroy the context object.

                              treeland_personalization_manager_v1
                              treeland_personalization_appearance_context_v1

                              Version 1

                              global appearance settings context

                              This interface allows a client to configure global appearance settings including round corner radius, icon theme, active color, window opacity, window theme type, and window titlebar height.

                              treeland_personalization_appearance_context_v1
                              enum theme_type {
                                  auto = 1,
                                  light = 2,
                                  dark = 4,
                              }
                              • auto — window auto theme
                              • light — window light theme
                              • dark — window dark theme

                              window theme type

                              treeland_personalization_appearance_context_v1
                              enum error {
                                  invalid_round_corner_radius = 0,
                                  invalid_icon_theme = 1,
                                  invalid_active_color = 2,
                                  invalid_window_opacity = 4,
                                  invalid_window_theme_type = 8,
                                  invalid_window_titlebar_height = 16,
                              }
                              • invalid_round_corner_radius — Wrong round corner radius
                              • invalid_icon_theme — Wrong icon theme
                              • invalid_active_color — Wrong active color
                              • invalid_window_opacity — Wrong window opacity
                              • invalid_window_theme_type — Wrong theme type
                              • invalid_window_titlebar_height — Wrong window titlebar height
                              treeland_personalization_appearance_context_v1
                              event round_corner_radius(
                                  radius: int,
                              )
                              • radius — round corner radius

                              round corner radius event

                              Send this signal after setting the round corner radius.

                              treeland_personalization_appearance_context_v1
                              event icon_theme(
                                  theme_name: string,
                              )
                              • theme_name — icon theme name

                              icon theme event

                              Send this signal after setting the system icon theme.

                              treeland_personalization_appearance_context_v1
                              event active_color(
                                  active_color: string,
                              )
                              • active_color — active color

                              active color

                              Send this signal after setting the system active color

                              treeland_personalization_appearance_context_v1
                              event window_opacity(
                                  opacity: uint,
                              )
                              • opacity — window opacity

                              window opacity

                              Sent when the window opacity has changed.

                              treeland_personalization_appearance_context_v1
                              event window_theme_type(
                                  type: uint<theme_type>,
                              )
                              • type — window theme type

                              window theme

                              Send this signal after setting the system theme

                              treeland_personalization_appearance_context_v1
                              event window_titlebar_height(
                                  height: uint,
                              )
                              • height — window titlebar height

                              window titlebar height

                              Send this signal after setting the window titlebar height

                              treeland_personalization_appearance_context_v1
                              request set_round_corner_radius(
                                  radius: int,
                              )

                                set window round corner radius

                                Set window round corner radius

                                treeland_personalization_appearance_context_v1
                                request get_round_corner_radius()

                                  get window round corner radius

                                  Get window round corner radius

                                  treeland_personalization_appearance_context_v1
                                  request set_icon_theme(
                                      theme: string,
                                  )
                                  • theme — icon theme

                                  set system icon theme

                                  Set the system icon theme

                                  treeland_personalization_appearance_context_v1
                                  request get_icon_theme()

                                    get system icon theme

                                    Get the system icon theme

                                    treeland_personalization_appearance_context_v1
                                    request set_active_color(
                                        color: string,
                                    )
                                    • color — rgb

                                    set system active color

                                    Set the system active color

                                    treeland_personalization_appearance_context_v1
                                    request get_active_color()

                                      get system active color

                                      Get the system active color

                                      treeland_personalization_appearance_context_v1
                                      request set_window_opacity(
                                          opacity: uint,
                                      )
                                      • opacity — opacity

                                      set window opacity

                                      Set the window opacity.

                                      treeland_personalization_appearance_context_v1
                                      request get_window_opacity()

                                        get window opacity

                                        Get the current window opacity.

                                        treeland_personalization_appearance_context_v1
                                        request set_window_theme_type(
                                            type: uint<theme_type>,
                                        )
                                        • type — window theme type

                                        set window theme type

                                        Set the window theme.

                                        treeland_personalization_appearance_context_v1
                                        request get_window_theme_type()

                                          get window theme type

                                          Get the window theme type

                                          treeland_personalization_appearance_context_v1
                                          request set_window_titlebar_height(
                                              height: uint,
                                          )
                                          • height — window titlebar height

                                          set window titlebar height

                                          Set the window titlebar height

                                          treeland_personalization_appearance_context_v1
                                          request get_window_titlebar_height()

                                            get window titlebar height

                                            Get the window titlebar height

                                            treeland_personalization_appearance_context_v1
                                            request destroy()
                                            Destructor

                                              destroy the context object

                                              Destroy the context object.