import QtQuick import Quickshell // One surface per configured desktop widget. The model is the list of ids, so // editing an item updates its existing surface instead of recreating it. Scope { id: root // Widgets are created shortly after startup: building many faces while // Quickshell 0.3.1 parses its first Hyprland client list makes a crash in // HyprlandToplevel::updateFromObject far more likely. property bool started: false Timer { running: true interval: 1500 onTriggered: root.started = true } Variants { model: root.started ? WidgetState.items.filter(i => !!WidgetRegistry.type(i.type)).map(i => i.id) : [] DesktopWidget {} } Variants { model: WidgetState.editing ? Quickshell.screens : [] WidgetEditor {} } }