Platform setup
Linux setup
Linux desktop widgets use the same embedded webview path as Desktop webview: createWidgetWindow without url (no widget.html copy). Extra Linux behavior is window pinning.
How it works
setWidgetConfigwrites IR into the desktop file store for(group, widgetId).createWidgetWindowopens a frameless Tauri webview on thewidgetviewprotocol.- With Cargo feature
linux(default), the window is built hidden and pinned before its first map — GDK hints for_NET_WM_WINDOW_TYPE_DESKTOP, skip taskbar / pager, sticky and below — then shown, and its position is applied again after the map (window managers often ignore it for DESKTOP windows). The defaultlayeron Linux isdesktop;layer: "top"/"bottom"/"normal"use ABOVE / BELOW / an ordinary window instead (window modes). - Optional feature
layer-shellmoves the webview into a gtk-layer-shell surface on Wayland: layer fromlayer(desktop→ Background,bottom→ Bottom,top→ Top;normalstays a plain toplevel), output from the monitor at the window position, namespace = window label, anchors + margins fromx/y(or fromplacement: right / bottom anchors keep their offset when the output resizes).clickThroughempties the input region;focusable: falseturns off keyboard interactivity. - Optional feature
notifyshows live activities as desktop notifications (activitySurface: "notification").
Setup
- Keep default features, or enable explicitly:
tauri-plugin-widgets = { version = "0.8", features = ["linux"] }
# Wayland:
# tauri-plugin-widgets = { version = "0.8", features = ["linux", "layer-shell"] }
- Allow the window label in capabilities (
windows+widgets:default) — Install. - Call
createWidgetWindowas in First widget.
Contributor harness / debugging: Linux harness.
When it fails
- Enable the
linuxfeature for X11 DESKTOP pinning (default-features = falsedrops it). - Wayland: try
layer-shell; plain X11 hints will not apply. - Window hidden behind everything and not clickable: that is
layer: "desktop"on some window managers; uselayer: "bottom". - See Linux harness for debugging pinned windows.
More symptoms: Troubleshooting index.
Windows setup
Two surfaces: Widgets Board (Adaptive Cards + MSIX provider) and/or the same desktop webview as other OSes.
Desktop webview
Desktop hosts show widgets as frameless transparent webview windows. The JSON config is drawn by a small HTML/JS renderer shipped inside the Rust crate — you do not copy or install a separate widget.html for the default path.