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 plugin sets X11_NET_WM_WINDOW_TYPE_DESKTOPso the window behaves like a desktop pin. - Optional feature
layer-shellremaps the window onto gtk-layer-shell Background on Wayland.
Setup
- Keep default features, or enable explicitly:
toml
tauri-plugin-widgets = { version = "0.4", features = ["linux"] }
# Wayland:
# tauri-plugin-widgets = { version = "0.4", 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. - See Linux harness for debugging pinned windows.
More symptoms: Troubleshooting index.
