RAGS - v1.10.0
    Preparing search index...
    Note

    package dependency: libdbusmenu-gtk3

    • added: (busName: string) emitted when a new TrayItem is added
    • removed: (busName: string) emitted when a TrayItem is removed
    • items: TrayItem[]
    • getItem: (busName: string) => TrayItem
    • changed: emitted on any change of the TrayItem
    • removed: (busName: string) emitted when this TrayItem is removed
    • menu: Gtk.Menu | undefined
    • category: string possible values: ApplicationStatus, Communications, SystemServices, Hardware
    • id: string
    • title: string
    • status: string possible values: Passive, Active, NeedsAttention
    • window-id: number
    • is-menu: boolean if true, showing the menu is preferred over activate
    • tooltip-markup: string
    • icon: string | GdkPixbuf.Pixbuf
    • activate: (event: Gdk.Event) => void
    • secondaryActivate: (event: Gdk.Event) => void
    • scroll: (event: Gdk.EventScroll) => void
    • openMenu: (event: Gdk.Event) => void
    const systemtray = await Service.import("systemtray");

    /** @param {import('types/service/systemtray').TrayItem} item */
    const SysTrayItem = (item) =>
    Widget.Button({
    child: Widget.Icon().bind("icon", item, "icon"),
    tooltipMarkup: item.bind("tooltip_markup"),
    onPrimaryClick: (_, event) => item.activate(event),
    onSecondaryClick: (_, event) => item.openMenu(event),
    });

    const sysTray = Widget.Box({
    children: systemtray.bind("items").as((i) => i.map(SysTrayItem)),
    });