From 9fe57b916be13d9f6eb9b13078d429ba3b5ef17a Mon Sep 17 00:00:00 2001 From: SirBlobby Date: Fri, 21 Aug 2026 15:22:18 -0400 Subject: [PATCH] Use the Blob icon for the bar menu button --- branding/blob_icon.svg | 25 ++++++++++++++++ omarchy/README.md | 11 +++++-- omarchy/plugins/blob.menu/BarWidget.qml | 38 +++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 branding/blob_icon.svg diff --git a/branding/blob_icon.svg b/branding/blob_icon.svg new file mode 100644 index 0000000..2e537ca --- /dev/null +++ b/branding/blob_icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/omarchy/README.md b/omarchy/README.md index ac1fec8..40eaa09 100644 --- a/omarchy/README.md +++ b/omarchy/README.md @@ -78,14 +78,21 @@ by hand; see below for why. hardcodes workspaces 1-5 as always visible and has no setting for it, so the clone changes that list to 1-9 to match the old waybar `persistent-workspaces`. -`plugins/blob.menu/` clones `omarchy.menu` to widen it and to let a menu row -choose where it sits. `cardWidth` in `Menu.qml` is hardcoded at +`plugins/blob.menu/` clones `omarchy.menu` to widen it, to let a menu row +choose where it sits, and to put the Blob icon on the bar button. `cardWidth` in `Menu.qml` is hardcoded at `Style.space(300)`; the clone raises it to 440, so the apps menu (Super + Space) and the root menu (Super + Alt + Space) are both wider. The two oversized menus (screen recording, font picker) keep their own 520 and are untouched. `omarchy-menu` still targets `omarchy.menu` on the CLI - the manifest records `clonedFrom`, and the shell routes those calls here. +`BarWidget.qml` swaps the stock `\ue900` glyph from the `omarchy` icon font for +`branding/blob_icon.svg`. Qt renders SVG through `qt6-svg`, but an `Image` +cannot be recolored, so the icon is used as an alpha mask over a rectangle +filled with the bar foreground. That keeps it following the theme and the bar's +own color animation the way a glyph did, and it means the black fill in the +source file never matters. + `mergeMenuSources` in `MenuModel.js` reads the default menu first and the user extension second, so a row that only exists in `extensions/omarchy-menu.jsonc` lands at the bottom of its menu with no way to move it. The clone adds a diff --git a/omarchy/plugins/blob.menu/BarWidget.qml b/omarchy/plugins/blob.menu/BarWidget.qml index 8fa7e1b..5d1195e 100644 --- a/omarchy/plugins/blob.menu/BarWidget.qml +++ b/omarchy/plugins/blob.menu/BarWidget.qml @@ -1,10 +1,16 @@ import QtQuick +import QtQuick.Effects +import Quickshell +import qs.Commons import qs.Ui BarWidget { id: root moduleName: "omarchy.menu" + readonly property string iconPath: "file://" + Quickshell.env("HOME") + "/.config/omarchy/branding/blob_icon.svg" + readonly property int iconSize: Math.round(Style.font.body * 1.35) + implicitWidth: button.implicitWidth implicitHeight: button.implicitHeight @@ -12,13 +18,41 @@ BarWidget { id: button anchors.fill: parent bar: root.bar - text: "\ue900" - fontFamily: "omarchy" + labelVisible: false + hasVisualContent: true + fixedWidth: root.iconSize + Style.spaceReal(15) 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 shell toggle omarchy.menu '{\"menu\":\"root\"}'") } + + Image { + id: iconMask + source: root.iconPath + visible: false + smooth: true + sourceSize.width: root.iconSize * 2 + sourceSize.height: root.iconSize * 2 + } + + Rectangle { + anchors.centerIn: parent + width: root.iconSize + height: root.iconSize + color: button.foreground + visible: iconMask.status === Image.Ready + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskSource: iconMask + } + + Behavior on color { + enabled: !root.bar || root.bar.foregroundAnimationEnabled + ColorAnimation { duration: 160 } + } + } } }