Use the Blob icon for the bar menu button

This commit is contained in:
2026-08-21 15:22:18 -04:00
parent b144445f0d
commit 9fe57b916b
3 changed files with 70 additions and 4 deletions
+9 -2
View File
@@ -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
+36 -2
View File
@@ -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 }
}
}
}
}