diff --git a/default/quickshell/omarchy-shell/plugins/bar/Bar.qml b/default/quickshell/omarchy-shell/plugins/bar/Bar.qml index 8e1b4f04..e5b2a74b 100644 --- a/default/quickshell/omarchy-shell/plugins/bar/Bar.qml +++ b/default/quickshell/omarchy-shell/plugins/bar/Bar.qml @@ -416,6 +416,18 @@ Item { } } + function toggleTransparency() { + var nextTransparent = !(root.transparent === true) + if (root.shell && typeof root.shell.mutateShellConfig === "function") { + root.shell.mutateShellConfig(function(config) { + if (!root.isPlainObject(config.bar)) config.bar = {} + config.bar.transparent = nextTransparent + }) + } else { + root.transparent = nextTransparent + } + } + function runProcess(process) { if (!process.running) process.running = true @@ -1066,9 +1078,10 @@ Item { MouseArea { anchors.fill: parent - acceptedButtons: Qt.LeftButton + acceptedButtons: Qt.LeftButton | Qt.RightButton onDoubleClicked: function(mouse) { - root.openBarSettings() + if (mouse.button === Qt.RightButton) root.openBarSettings() + else root.toggleTransparency() mouse.accepted = true } } diff --git a/default/quickshell/omarchy-shell/plugins/bar/README.md b/default/quickshell/omarchy-shell/plugins/bar/README.md index b46b47e5..c6654074 100644 --- a/default/quickshell/omarchy-shell/plugins/bar/README.md +++ b/default/quickshell/omarchy-shell/plugins/bar/README.md @@ -16,7 +16,7 @@ the shell for its whole session. The bar config lives under the `bar:` key of [`~/.config/omarchy/shell.json`](../../README.md#shelljson-shape). Out of the box the shell uses [`shell-defaults.json`](../../shell-defaults.json). Once you customize anything via `omarchy launch bar settings` or by editing shell.json directly, your file is canonical — there is no deep-merge. -Launch the visual editor with `omarchy launch bar settings` (or run `omarchy-launch-bar-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand. You can also double-click empty space to the left or right of the centered clock to open it. +Launch the visual editor with `omarchy launch bar settings` (or run `omarchy-launch-bar-settings`) to reorder widgets, add/remove them, and tweak per-widget options without editing JSON by hand. You can also double-right-click empty space to the left or right of the centered clock to open it; double-left-click the same empty space to toggle bar transparency. Example `shell.json` (bar subtree only shown):