Fix the forked bar failing to load

This commit is contained in:
2026-08-19 19:51:59 -04:00
parent 1c25b44b8e
commit b55f925281
2 changed files with 25 additions and 8 deletions
+5 -5
View File
@@ -12,14 +12,14 @@ Item {
id: root
// The omarchy-shell host injects omarchyPath from OMARCHY_PATH.
required property string omarchyPath
property string omarchyPath: ""
// Injected by the host shell so bar slots can resolve enabled widgets.
required property var barWidgetRegistry
property var barWidgetRegistry: null
// Injected by the host shell every time shell.json is reloaded. Holds the
// `bar:` subtree: position, centerAnchor, layout. The host owns file IO;
// the bar just renders whatever it's handed. The bar font follows the
// OS-level fontconfig monospace binding — it is not stored in shell.json.
required property var barConfig
property var barConfig: null
// Injected by the host shell. Used for shell-wide actions such as opening
// settings and persisting inline widget state.
property var shell: null
@@ -1533,10 +1533,10 @@ Item {
// plugin enabled/disabled, etc.). Reading the `widgets` property creates
// the binding dependency — the wrapped function call alone wouldn't.
readonly property var registryComponent: {
var w = root.barWidgetRegistry.widgets
var w = root.barWidgetRegistry ? root.barWidgetRegistry.widgets : null
if (customType) return null
var registryName = root.canonicalWidgetId(moduleName)
return w[registryName] ? w[registryName].component : null
return w && w[registryName] ? w[registryName].component : null
}
readonly property bool qmlCustom: customType === "qml"
readonly property bool commandCustom: customType === "command"