System details
- Apple MacBook Air (13-inch, M2, 2022) — Asahi Linux, aarch64
- Omarchy 4.0.2-2 — fork
omarchy-mac/omarchy-mac, branch quattro, commit e44b122f
- Hyprland 0.56.2
- Kernel 7.1.13-3-2-ARCH
What's wrong?
On Apple Silicon, closing the lid never locks the session.
default/hypr/bindings/utilities.lua handles the lid switch. Upstream binds the
lid-close event to omarchy-system-lid-close, which locks the session (unless an
external monitor is connected) and then applies the clamshell display state:
o.bind("switch:on:Lid Switch", nil, "omarchy-system-lid-close", { locked = true })
o.bind("switch:off:Lid Switch", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
The Mac fork adds the device name Apple Silicon actually uses, but points the
lid-close event straight at omarchy-hyprland-monitor-clamshell, skipping the lock:
-- Mac fork: Apple Silicon names the lid switch "Apple SMC power/lid events", not
-- the generic "Lid Switch", so quattro's binds above never fire on this hardware.
o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
o.bind("switch:off:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
As that comment says, the generic switch:on:Lid Switch never fires on this hardware, so
the switch:on:Apple SMC power/lid events line above is the only lid-close handler
that runs — and it never calls omarchy-system-lid-close. Display reconciliation still
happens; the lock does not.
Expected: closing the lid locks the session when no external monitor is connected,
matching upstream.
Fix: point the Apple Silicon lid-close event at omarchy-system-lid-close, which
already falls through to the clamshell script:
o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-system-lid-close", { locked = true })
o.bind("switch:off:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
Steps to reproduce
-
Confirm the lid switch device name on Apple Silicon:
$ hyprctl devices | sed -n '/Switches:/,$p'
Switches:
Switch Device at 0x...:
Apple SMC power/lid events
-
Confirm which handler the lid-close event is bound to. The generic key exists but
never fires, and the Apple key resolves to the clamshell script (the description is
empty because the fork passes nil):
$ hyprctl binds | grep -A4 'switch:on:'
key: switch:on:Lid Switch
description:
dispatcher: __lua
...
key: switch:on:Apple SMC power/lid events
description:
dispatcher: __lua
Add a temporary description to either line (or check
default/hypr/bindings/utilities.lua) to see that the Apple key points at
omarchy-hyprland-monitor-clamshell, while omarchy-system-lid-close is never
invoked.
-
Close the lid with no external monitor connected. The internal panel is reconciled as
expected, but the session is not locked.
Verification of the fix
Re-binding just the lid-close event in the user config restores the lock:
-- ~/.config/hypr/bindings.lua
hl.unbind("switch:on:Apple SMC power/lid events")
o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-system-lid-close", { locked = true })
After hyprctl reload, hyprctl binds reports exactly one handler for that key, and
closing the lid now locks the session. Tested twice on the machine above.
Notes
omarchy debug --no-sudo --print is not available in 4.0.2-2 (Unknown Omarchy command),
so no debug log is attached; the system details above come from uname -r,
omarchy version and hyprctl version.
System details
omarchy-mac/omarchy-mac, branchquattro, commite44b122fWhat's wrong?
On Apple Silicon, closing the lid never locks the session.
default/hypr/bindings/utilities.luahandles the lid switch. Upstream binds thelid-close event to
omarchy-system-lid-close, which locks the session (unless anexternal monitor is connected) and then applies the clamshell display state:
The Mac fork adds the device name Apple Silicon actually uses, but points the
lid-close event straight at
omarchy-hyprland-monitor-clamshell, skipping the lock:As that comment says, the generic
switch:on:Lid Switchnever fires on this hardware, sothe
switch:on:Apple SMC power/lid eventsline above is the only lid-close handlerthat runs — and it never calls
omarchy-system-lid-close. Display reconciliation stillhappens; the lock does not.
Expected: closing the lid locks the session when no external monitor is connected,
matching upstream.
Fix: point the Apple Silicon lid-close event at
omarchy-system-lid-close, whichalready falls through to the clamshell script:
Steps to reproduce
Confirm the lid switch device name on Apple Silicon:
Confirm which handler the lid-close event is bound to. The generic key exists but
never fires, and the Apple key resolves to the clamshell script (the
descriptionisempty because the fork passes
nil):Add a temporary description to either line (or check
default/hypr/bindings/utilities.lua) to see that the Apple key points atomarchy-hyprland-monitor-clamshell, whileomarchy-system-lid-closeis neverinvoked.
Close the lid with no external monitor connected. The internal panel is reconciled as
expected, but the session is not locked.
Verification of the fix
Re-binding just the lid-close event in the user config restores the lock:
After
hyprctl reload,hyprctl bindsreports exactly one handler for that key, andclosing the lid now locks the session. Tested twice on the machine above.
Notes
omarchy debug --no-sudo --printis not available in 4.0.2-2 (Unknown Omarchy command),so no debug log is attached; the system details above come from
uname -r,omarchy versionandhyprctl version.