Repository navigation
Conversation
Hyprland compares a switch bind against the device name byte for byte and 0.56 has no wildcard form, so a lid reporting any other name never fires. Apple Silicon exposes its SW_LID switch as "Apple SMC power/lid events", never as "Lid Switch", so neither lid bind matched and omarchy-system-lid-close never ran on that hardware. Refs omacom#8418
|
No actionable defect found in the source review at Verified (source inspection): The added Apple-name bindings retain the existing
This fixes the registration gap, not the complete Apple lid-handling path: Review informationTest scope: Source inspection only, including the new literal-binding test. No tests or physical lid events were executed; locking, suspend and display behavior on Apple hardware were not independently verified. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra Medium initial inspection and synthesis, independent Opus 5.5 High and GPT 6 Sol Xhigh technical reviews, with claims checked against source evidence and a fresh Astra Medium editorial check. |
|
Reviewed at What ran, on a disposable Omarchy VM (Hyprland 0.56.2):
The VM has no lid switch, so this proves the bind is registered, not that it fires on Apple hardware. A bind for a device name a machine doesn't have does nothing, so other laptops are unaffected. On its own this has no visible effect on Apple Silicon. As the description says, Same change elsewhere: #13661 adds the same two binds to the same file on the same base, and was opened later. This one is the more complete of the two, because its test also checks Second opinion: none. The configured reviewer (Codex Medium) answers, but today's review budget was used up, so only Claude Opus 5.5 reviewed this. @GonzFC, if you can, please test this exact commit on one of your MacBook Airs: After the reboot, |
|
Hardware confirmation from a 14" MacBook Pro (M1 Pro, 2021, I traced the lock state (
So the device name is right, and with this PR plus #7951 both the lock and the clamshell path work on Apple Silicon. |
The test checked each bind with a substring match, so it still passed with every lid bind commented out, which is the regression it exists to catch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Re-reviewed now that a second opinion was available. Codex Medium found a defect in the new test, so I pushed a fix to the branch. The new head is What was wrong: Codex also pointed out two cases a line match can't handle: binds wrapped in a Who checked it: Claude Opus 5.5 and Codex Medium. Codex agreed the bind change is correct and proportionate. It also confirmed that Hardware confirmation: @cb2206, thanks for the detailed trace on the M1 Pro. It's strong evidence that the device name is right and that this PR plus #7951 makes both the lock and the clamshell path work, and the maintainer can weigh it. It can't mark this PR verified, though. That needs a test of this exact commit, by the person who reported #8418 or by a maintainer, and your run used omarchy-mac's copy of these lines. #13661, which added the same binds, has since been closed, so this PR has no competitor. Lock on lid close on Apple Silicon still also needs #7951, which is still open. @GonzFC, if you can, please test the new head on one of your MacBook Airs: The checks are the same as in my earlier comment. After the reboot, |
|
|
Closing as out of scope: Omarchy now supports only installs made from the official Omarchy ISO, and this change exists for Apple Silicon, which the ISO doesn't produce. We aren't taking on code paths for setups outside that, because nobody here can test or maintain them. The community-maintained omarchy-mac project is the place for Apple Silicon work. Thanks for the work that went into this. (Checked by Claude Opus 5.5; no second review.) |
default/hypr/bindings/utilities.luabinds the lid to the device nameLid Switch. Apple Silicon reports its lid asApple SMC power/lid events, so neither bind matches andomarchy-system-lid-closenever runs on that hardware.Hyprland matches a switch bind by exact string comparison and has no wildcard form. Checked against the v0.56.2 tag:
CInputManager::newSwitchpasses the raw device name toonSwitchOnEvent/onSwitchOffEvent.onSwitchOnEventbuildskeyName = "switch:on:" + switchNameverbatim, with no normalization.handleKeybindscompares withif (key.keyName != k->key) continue;, a plainstd::stringinequality. No prefix, substring, or case folding.switch:on:with an empty name is just another literal, and thecatchAllbranch is gated onkey.keyName.empty(), which never holds for a switch event.AQ_SWITCH_TYPE_LID, but Hyprland's fire listener reads onlyevent.enable, so capability matching is not available either.A second literal pair is therefore the only fix available in this version. Registering both is safe:
handleKeybindsevaluates every bind independently, and only one of the two names can equal a given machine's device name, so exactly one pair fires.Hardware
MacBookPro17,1 (M1, 2020), Arch Linux ARM, Hyprland 0.56.2.
What this does and does not change
It does not fix "closing the lid fails to lock", because logind sees the lid through its own evdev handling and already covers that. Measured on this machine:
What is missing is omarchy's own lid handling. Since the bind never fires,
omarchy-system-lid-closenever runs, so its docked exemption ("a docked lid close does not suspend, so it must not lock either") never applies, andomarchy-hyprland-monitor-clamshellnever runs on lid open.This is one of the two independent breakages described in #8418. The other is
omarchy-hw-laptop-closedreading/proc/acpi, which Apple Silicon does not provide; that half is addressed by #7951 and #9754. Both are needed before a lid close reachesomarchy-system-lockthrough omarchy's own path.Test plan
bash test/shell.d/lid-switch-bindings-test.sh, new here. Asserts both device names bind on and off to the same handlers withlocked = true, which matters because without it the bind is skipped exactly when the lid closes on an already locked session. Verified to fail against the pre-fix file and pass after.bash test/shell.d/hyprland-binding-conflicts-test.sh, the added binds introduce no conflict.bash test/shell.d/hyprland-default-config-test.shbash test/shell.d/lid-close-test.shRefs #8418
🤖 Generated with Claude Code