Show or hide the Omarchy bar per display.
A bar-widget button + a popup that lists every monitor with a toggle, its resolution and refresh rate. Turning a display off hides the bar there; the bar always stays visible on at least one display. Works with the Shibumi bar and the default Omarchy bar.
omarchy plugin add https://github.com/Deoxizn/BarDisplay.git --enableomarchy plugin add clones the repo, validates it, and enables the widget in
the right section of the bar. Or drop the widget into bar.layout.right in
~/.config/omarchy/shell.json manually. The shell hot-reloads plugins and the
bar.
omarchy plugin update dev.deoxizn.bardisplayomarchy plugin update fetches the latest version, shows the diff, and asks
before applying it. Run it without an id to update every installed
git-managed plugin.
- A headless
serviceowns the state. The set of displays the bar appears on is stored in~/.config/omarchy/shell.jsonunderbar.monitors; an empty list means "every display" (the default, so nothing changes out of the box). - Toggling a display writes
bar.monitorsand pushes the list straight into the running bar, so panels appear/disappear without a restart. - Bar plugins have no native per-display toggle, so the service also runs
scripts/ensure-bar-support.shagainst the active bar's QML. That patch is idempotent (skips when already applied), backs the file up first, and refuses to touch the bar if its structure changed after an update — so it can't break the bar, it just re-applies the support when an update wipes it. - The default Omarchy bar lives in root-owned
/usr/share/omarchy, so patching it needs a one-time admin grant. The panel shows an Apply button that runs the same script throughpkexec; the support re-applies itself after updates (the panel will ask again). - System bars are not watched by Omarchy's plugin watcher (that only hot-reloads
bars under
~/.config/omarchy/plugins), so the running built-in bar cannot read a freshly patched file. After a successful admin patch the panel confirms it (a desktop toast plus an 8-second countdown with a Cancel in the popup, in case pkexec's dialog stole the focus) and auto-restarts the shell viaomarchy restart shell(Omarchy's own crash-free restart — notQuickshell.reload, which can crash quickshell-git). If the restart ever fails the panel keeps a manual Restart button. - The widget and its popup live in one
Panel.qmlentry point (like Omabench). TheKeyboardPanelis a direct child of the widget root, which the Shibumi host relies on to anchor the popup to the visible bar edge and size it to the real content — don't wrap it in aLoaderor innerItem. - Physical resolution and refresh rates come from
hyprctl monitors -j(Hyprland), fetched once by the service at startup. Quickshell screens only report logical (scale-divided) pixels, so the physical width/height would otherwise read wrong on scaled displays.
omarchy plugin remove dev.deoxizn.bardisplayRemove the widget from bar.layout in shell.json, and if you want to revert
the bar itself, restore the backup the support script keeps next to the patched
file (Bar.qml.bardisplay.bak).
BarDisplay never modifies system files on the normal code path:
- Shibumi bar: has native
barMonitorssupport; the plugin only writesbar.monitorsto~/.config/omarchy/shell.json(user-owned). - Stock Omarchy bar: lives at
/usr/share/omarchy/shell/plugins/bar/Bar.qml(root-owned). The one-time admin patch viapkexecis guarded by:- Symlink refusal — the script refuses to operate on symlinks for both the bar file and its backup.
- Path allowlist — the elevated script only accepts the exact stock bar
path (
/usr/share/omarchy/shell/plugins/bar/Bar.qml); any other path is rejected. - Backup validation — the backup is verified to be a regular file in the same directory as the bar file.
- TOCTOU re-check — the bar file is re-verified as a regular file immediately before the write, after the backup is created.
- Self-healing on update — if the stock bar is updated and the patch is wiped, the service detects it and re-applies (the user is asked again).
- A one-time shell crash after the first install is a quickshell-git bug, not a
BarDisplay problem.
Quickshell.reloadtears the IPC handler registry down in a way that can use-after-free (IpcHandler::updateRegistration,FileView) when a new engine generation is created — the reason Omarchy ships with Quickshell's own reloading disabled and reloads at the plugin level instead. BarDisplay used to callQuickshell.reload(false)to make the patched bar pick up its support; that reload was what crashed, so it has been removed in favor of Omarchy's plugin watcher, which re-creates user-owned bars the moment the patch writes their QML. For the built-in (system) bar — which the watcher does not cover — the service instead restarts the shell with Omarchy's ownomarchy restart shellafter a successful admin patch. - The bar patch is applied at shell startup from values computed fresh from the
loaded manifests. Relying on QML bindings that read nested members of a
property var(likemanifest.__sourceDir) reads stale inside the host's change handlers and silently skips the patch;sourceDirFor()/activeBarFileFor()/supportScriptFor()avoid that.
