Toggle transparency with double left, go to settings with double right

This commit is contained in:
David Heinemeier Hansson
2026-05-16 22:48:10 +02:00
parent 768d246944
commit b37386f084
2 changed files with 16 additions and 3 deletions
@@ -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
}
}
@@ -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):