You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How Wallrus swaps Three.js scenes without replacing a working wallpaper first
#2
When a wallpaper is a JavaScript scene, selecting a new file can fail late. The import can succeed and a GLSL program can still fail to compile, or a scene's first tick can throw. Wallrus stages a new JavaScript scene before it replaces the one on the desktop.
How the scene swap crosses threads
A worker handling wallrus set sends a typed UiAction::LoadScene to the desktop event loop. The action includes a request ID. The worker holds the receiving half of a one-shot reply channel while the daemon keeps the pending path and sender.
The UI thread calls into the embedded WebView. For Wallrus modules, the JavaScript host constructs a staging scene, calls its setup, compiles the Three.js renderer, and runs an initial tick. A staging failure disposes the candidate and reports the error.
The WebView returns SceneLoaded with the original request ID. On success, the Rust handler updates the active path and stores it for the next daemon start before replying to the CLI. The CLI has a bounded wait.
The two platform backends deliver that same action differently. Linux drains a channel from the GTK event loop, while macOS receives a user event on the Tao event loop. Both hand the request to the same WebView function.
If you use a different compositor, feedback on scene switches, focus, or monitor layout is especially welcome. Include the OS or compositor version and the output from wallrus status --json.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When a wallpaper is a JavaScript scene, selecting a new file can fail late. The import can succeed and a GLSL program can still fail to compile, or a scene's first tick can throw. Wallrus stages a new JavaScript scene before it replaces the one on the desktop.
How the scene swap crosses threads
wallrus setsends a typedUiAction::LoadSceneto the desktop event loop. The action includes a request ID. The worker holds the receiving half of a one-shot reply channel while the daemon keeps the pending path and sender.SceneLoadedwith the original request ID. On success, the Rust handler updates the active path and stores it for the next daemon start before replying to the CLI. The CLI has a bounded wait.Request and reply channels · Rust commit handler · Three.js staging
The two platform backends deliver that same action differently. Linux drains a channel from the GTK event loop, while macOS receives a user event on the Tao event loop. Both hand the request to the same WebView function.
GTK backend · Tao backend
Try a scene
wallrus set https://wallrus.pages.dev/scenes/frosted_glass_garden.js wallrus status --json17-second desktop recording on Hyprland · Downloads for Apple Silicon and Linux x86_64
If you use a different compositor, feedback on scene switches, focus, or monitor layout is especially welcome. Include the OS or compositor version and the output from
wallrus status --json.All reactions