Pick window transparency from Appearance > Window Transparency, and a Glassy bar background (#14991)

* Pick window transparency from Appearance > Window Transparency

Transparent, the default, keeps today's windows. Opaque turns the windows
Omarchy makes transparent solid. Glassy is the frosted glass Starship
(#14726): its blur behind every see-through window and shell surface, and a
see-through, blurred background in the theme's terminal files, since foot
turns compositor blur down and a Hyprland opacity rule fades text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Leave window transparency to Appearance when animations are off

Turning animations off no longer makes windows opaque. VM installs start
with opaque windows instead, and a migration keeps them opaque for anyone
who already has animations off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a Glassy bar background, under Menu Bar > Bar Background

Menu Bar > Bar Background picks Opaque Bar, Glassy Bar or Clear Bar, and
Indicators becomes Bar Indicators to match. Glassy keeps the theme
background faintly and Hyprland blurs what is behind it, with the same blur
as Glassy windows.

omarchy bar background opaque|glassy|none|cycle sets it and prints it when
given nothing. omarchy bar transparent true|false|toggle stays for
compatibility, as none and opaque. Double-clicking the bar cycles through
the three backgrounds the same way, from clear to glassy to opaque.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Stop when a saved corner choice can't be removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Make btop follow glassy windows

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Heinemeier HanssonandClaude Opus 5.5 authored and GitHub committed 2026-10-11 21:21:00 +09:00
1 parent be7c7bf378
commit a98e55eb91
32 files changed
+814 -64

No files matched your search

+26 -14
View File
@@ -45,7 +45,7 @@ Item {
property string omarchyConfigDir: home + "/.config/omarchy"
property var fallbackBarConfig: ({
position: "top",
transparent: false,
background: "opaque",
centerAnchor: "omarchy.clock",
layout: { left: [], center: [], right: [] }
})
@@ -54,6 +54,12 @@ Item {
property bool requestedTransparent: false
property bool useTransparentForeground: false
property bool transparent: false
// A see-through bar that Hyprland blurs behind (the bar-glassy toggle), so
// its theme background stays faintly. A transparent bar wins over it.
property bool glassy: false
// The look the blur behind the bar was last synced for. A background set by
// editing shell.json skips the CLI, so the bar syncs Hyprland's blur itself.
property string glassSyncedLook: ""
property bool centerSectionHovered: false
// One bar surface exists per monitor and each reports into this count, so a
// pointer crossing from one monitor's bar to another's stays counted however
@@ -79,6 +85,7 @@ Item {
property color barForeground: useTransparentForeground ? transparentForeground : themeForeground
property bool foregroundAnimationEnabled: true
property color background: Commons.Color.bar.background
readonly property color glassBackground: Qt.rgba(background.r, background.g, background.b, Math.min(background.a, 0.35))
property color urgent: Commons.Color.bar.active
Behavior on barForeground { enabled: root.foregroundAnimationEnabled; ColorAnimation { duration: Style.duration(420); easing.type: Easing.OutCubic } }
@@ -651,7 +658,18 @@ Item {
var config = Util.isPlainObject(barConfig) ? barConfig : fallbackBarConfig
position = normalizePosition(config.position)
setRequestedTransparency(config.transparent === true)
// opaque, glassy or none; a config from before background says
// transparent instead.
var look = config.background || (config.transparent === true ? "none" : "opaque")
setRequestedTransparency(look === "none")
// A bar going clear waits for its text color before dropping its
// background, so a glassy one stays glassy until then rather than
// flashing opaque. Once clear, transparent wins over a stale glassy.
if (look !== "none") glassy = look === "glassy"
if (look !== glassSyncedLook) {
glassSyncedLook = look
Util.execDetached("omarchy-bar sync-glass")
}
centerAnchor = Util.canonicalWidgetId(config.centerAnchor || "")
// layoutEntries feeds plain JS arrays to the module Repeaters, and QML
@@ -913,16 +931,10 @@ Item {
Util.execDetached(command)
}
function toggleTransparency() {
var nextTransparent = !(root.requestedTransparent === true)
if (root.shell && typeof root.shell.mutateShellConfig === "function") {
root.shell.mutateShellConfig(function(config) {
if (!Util.isPlainObject(config.bar)) config.bar = {}
config.bar.transparent = nextTransparent
})
} else {
root.setRequestedTransparency(nextTransparent)
}
// Steps the bar background from clear to glassy to opaque and around. Through
// omarchy-bar, which keeps Hyprland's blur behind a glassy bar in step.
function cycleBackground() {
Util.execDetached("omarchy-bar background cycle")
}
function rawLayoutSection(config, region) {
@@ -1357,7 +1369,7 @@ Item {
implicitWidth: root.vertical ? thickness : 0
implicitHeight: root.vertical ? 0 : thickness
color: root.transparent ? "transparent" : root.background
color: root.transparent ? "transparent" : (root.glassy ? root.glassBackground : root.background)
surfaceFormat.opaque: false
WlrLayershell.namespace: "omarchy-bar"
WlrLayershell.layer: WlrLayer.Top
@@ -1832,7 +1844,7 @@ Item {
return
}
if (mouse.button === Qt.LeftButton) {
root.toggleTransparency()
root.cycleBackground()
mouse.accepted = true
}
}
+2 -2
View File
@@ -16,7 +16,7 @@ the shell for its whole session.
The bar config lives under the `bar:` key of [`~/.config/omarchy/shell.json`](../../../docs/omarchy-shell.md#shelljson). Out of the box the shell uses [`config/omarchy/shell.json`](../../../config/omarchy/shell.json). Once you customize anything via the bar gestures, `omarchy bar ...`, or by editing shell.json directly, your file is canonical — there is no deep-merge.
The bar is configured directly on the bar itself: drag empty bar space (or click-and-hold) to move the bar to another screen edge, double-left-click empty center-bar space to toggle transparency, and drag widgets to reorder them. The `omarchy bar position`, `omarchy bar transparent`, `omarchy bar move`, and `omarchy bar set` commands do the same from scripts. Enable or disable widgets with `omarchy plugin enable` and `omarchy plugin disable` (widget ids come from `omarchy plugin list`).
The bar is configured directly on the bar itself: drag empty bar space (or click-and-hold) to move the bar to another screen edge, double-left-click empty center-bar space to cycle the bar background from clear to glassy to opaque, and drag widgets to reorder them. The `omarchy bar position`, `omarchy bar background`, `omarchy bar move`, and `omarchy bar set` commands do the same from scripts. Enable or disable widgets with `omarchy plugin enable` and `omarchy plugin disable` (widget ids come from `omarchy plugin list`).
Example `shell.json` (bar subtree only shown):
@@ -25,7 +25,7 @@ Example `shell.json` (bar subtree only shown):
"version": 1,
"bar": {
"position": "top",
"transparent": false,
"background": "opaque",
"centerAnchor": "omarchy.clock",
"layout": {
"left": [