Omahub
← All plugins
M

Display Watcher

by Matheus

Turn the laptop display off when an external monitor is connected and back on when it is disconnected, using Omarchy's own internal-monitor toggle.

Install
$ omarchy plugin add https://github.com/mfellipeso/omarchy-display-watcher --enable
Hardware #Hyprland #quickshell #system

Display Watcher — Omarchy shell plugin

Turns the laptop display off when you connect an external monitor, and back on when you disconnect it. No bar widget, no daemon scripts — just a tiny service plugin running inside omarchy-shell.

Install

omarchy plugin add https://github.com/mfellipeso/omarchy-display-watcher.git --enable

How it works

The service listens to Hyprland monitor events straight from Quickshell and reconciles the laptop panel through Omarchy's own toggle (omarchy-hyprland-monitor-internal) — so it behaves exactly like the built-in keybinding: same notifications, same guards (never disables the only active display, respects mirror mode), same state flag.

flowchart TD
    E["Hyprland event<br/>monitoradded / monitorremoved"] --> F{"Internal panel<br/>eDP / LVDS / DSI?"}
    F -- "yes" --> I["Ignore — own actions and<br/>manual toggles echo back here"]
    F -- "no" --> R["Reconcile at 0s / 1s / 3s<br/>(a fresh monitor can take a<br/>moment to become active)"]
    R --> D{"External monitor<br/>active?"}
    D -- "yes" --> OFF["omarchy-hyprland-monitor-internal <b>off</b><br/>🔔 Laptop display disabled"]
    D -- "no" --> ON["omarchy-hyprland-monitor-internal <b>on</b><br/>🔔 Laptop display enabled"]

It also reconciles once when the shell starts, covering logins that begin already docked.

Behavior notes

  • Re-enable the laptop display manually while docked and the plugin respects it — the policy is only re-applied on the next monitor change.
  • Clamshell mode (lid closed) stays with Omarchy's stock watcher; this plugin only manages the flag it sets itself.
  • When the last real monitor is unplugged while the panel is off, Hyprland spawns a virtual FALLBACK output. The reconcile check ignores it (and HEADLESS-*), so you never get stranded on a black screen — a case the stock omarchy-hyprland-monitor-external-active check gets wrong.

Update / remove

omarchy plugin update mfellipeso.display-watcher
omarchy plugin remove mfellipeso.display-watcher

Removal is clean: the plugin only calls Omarchy's own toggle and writes no state of its own. If the laptop panel is off when you remove it, turn it back on with the built-in keybinding or omarchy-hyprland-monitor-internal on.

Dependencies

Nothing beyond a stock Omarchy install — Hyprland, omarchy-shell (Quickshell), and the omarchy-hyprland-monitor-internal command that ships with Omarchy.

License

MIT