diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index 5b36398d..83115117 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -258,7 +258,6 @@ Item { function builtinModuleComponent(name) { switch (String(name)) { - case "omarchy": return omarchyModuleComponent case "clock": return clockModuleComponent case "update": return updateModuleComponent case "indicators": return indicatorsModuleComponent @@ -303,6 +302,7 @@ Item { // Each entry maps a module id to its display metadata; the QML source is // loaded asynchronously via Qt.createComponent. readonly property var firstPartyWidgetMetadata: ({ + "omarchy": { displayName: "Omarchy menu", description: "Launches the Omarchy menu", category: "Compositor", allowMultiple: false }, "workspaces": { displayName: "Workspaces", description: "Workspace number indicators", category: "Compositor", allowMultiple: false }, "media": { displayName: "Media", description: "MPRIS now-playing with playback controls", category: "Media", allowMultiple: false }, "audioPanel": { displayName: "Audio", description: "Volume slider, output picker, per-app mixer", category: "Audio", allowMultiple: false, sourceDir: "../panels", sourceName: "Audio" }, @@ -711,7 +711,6 @@ Item { } Component { id: emptyModuleComponent; Item { implicitWidth: 0; implicitHeight: 0; visible: false } } - Component { id: omarchyModuleComponent; OmarchyModule {} } Component { id: clockModuleComponent; ClockModule {} } Component { id: updateModuleComponent; UpdateModule {} } Component { id: indicatorsModuleComponent; IndicatorsModule {} } @@ -1442,16 +1441,6 @@ Item { } } - component OmarchyModule: ModuleButton { - text: "\ue900" - fontFamily: "omarchy" - horizontalMargin: 7.5 - onPressed: function(button) { - if (button === Qt.RightButton) root.run("xdg-terminal-exec") - else root.run("omarchy-shell menu toggle root") - } - } - component ClockModule: ModuleButton { text: root.clockText() horizontalMargin: 8.75 diff --git a/shell/plugins/bar/README.md b/shell/plugins/bar/README.md index 9a1cf6ec..dc5f89f7 100644 --- a/shell/plugins/bar/README.md +++ b/shell/plugins/bar/README.md @@ -54,6 +54,7 @@ Example `shell.json` (bar subtree only shown): | Name | What it does | Interactions | |---|---|---| +| `omarchy` | Omarchy menu launcher | left = menu · right = terminal | | `workspaces` | Hyprland workspace switcher | left = focus workspace | | `media` | MPRIS now-playing — scrolling track + artist, cover-art popup | left = play/pause · middle = next · scroll = prev/next · right = popup | | `daytime` | Day/time label with date tooltip | hover = date | @@ -74,7 +75,7 @@ Example `shell.json` (bar subtree only shown): ### Built-in base modules (in `Bar.qml`) -`omarchy`, `clock`, `update`, `indicators`, `tray`. +`clock`, `update`, `indicators`, `tray`. The `indicators` module loads individual bar indicators from `indicators/`, ordered by its `items` array in `shell.json`. Rich panels such as `powerPanel`, `networkPanel`, and `audioPanel` live in `../panels/` above. diff --git a/shell/plugins/bar/widgets/omarchy.qml b/shell/plugins/bar/widgets/omarchy.qml new file mode 100644 index 00000000..57222008 --- /dev/null +++ b/shell/plugins/bar/widgets/omarchy.qml @@ -0,0 +1,24 @@ +import QtQuick +import qs.Ui + +BarWidget { + id: root + moduleName: "omarchy" + + implicitWidth: button.implicitWidth + implicitHeight: button.implicitHeight + + WidgetButton { + id: button + anchors.fill: parent + bar: root.bar + text: "\ue900" + fontFamily: "omarchy" + horizontalMargin: 7.5 + onPressed: function(button) { + if (!root.bar) return + if (button === Qt.RightButton) root.bar.run("xdg-terminal-exec") + else root.bar.run("omarchy-shell menu toggle root") + } + } +} diff --git a/shell/plugins/settings/SettingsPanel.qml b/shell/plugins/settings/SettingsPanel.qml index 91e84d16..a60c8585 100644 --- a/shell/plugins/settings/SettingsPanel.qml +++ b/shell/plugins/settings/SettingsPanel.qml @@ -291,7 +291,6 @@ Item { // ---------------- widget catalog ----------------------------------------- readonly property var builtinWidgetMeta: ({ - "omarchy": { name: "Omarchy menu", description: "Launches the Omarchy menu", category: "Compositor" }, "clock": { name: "Clock", description: "Date / time text", category: "Time" }, "update": { name: "Updates", description: "Indicates available system updates", category: "System" }, "indicators": { name: "Indicators", description: "Manual state indicators", category: "Status" },