Skip to content

Handle the lid on ChromeOS EC laptops like Googlebooks and Chromebooks - #18777

Merged
birkskyum merged 1 commit into
omacom:quattrofrom
adenta:chromeos-ec-lid-switch
Nov 15, 2026
Merged

birkskyum merged 1 commit into
omacom:quattrofrom
adenta:chromeos-ec-lid-switch

Conversation

@adenta

@adenta adenta commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What changes

Laptops with a ChromeOS embedded controller (Googlebooks, Chromebooks) report their lid through the cros_ec_buttons input device instead of ACPI's Lid Switch. The Hyprland lid binds match by device name, so on these machines closing the lid never runs omarchy-system-lid-close (no lock, no clamshell reconcile), and opening it never runs omarchy-hyprland-monitor-clamshell.

This adds the same pair of binds under cros_ec_buttons, following the Apple SMC entry. Lid detection already works on these machines without changes: omarchy-hw-laptop and omarchy-hw-laptop-closed read the SW_LID capability bit rather than the device name.

On convertibles, cros_ec_buttons may also report tablet mode. Both bound commands check the real lid state first (omarchy-system-lid-close only locks when omarchy-hw-laptop-closed says the lid is closed), so a stray switch event shouldn't lock the session. I haven't tested this on a convertible.

Verification

  • On a Dell XPS 13 Googlebook (Snapdragon X1E80100, google,mica, Omarchy 4.5.0 ARM64), /proc/bus/input/devices shows cros_ec_buttons with B: SW=1: SW_LID only. Its cros_ec keyboard device carries no switches.
  • On that machine, these binds have been carried as a user config overlay for several days of lid close/open cycles: close locks the session before logind suspends, and open reconciles displays. The overlay's open bind also chains a DPMS re-enable for a separate issue, so it isn't byte-identical to this change, and I haven't tested this exact file from the system default path on-device.
  • luac -p default/hypr/bindings/utilities.lua: OK.
  • test/shell.d/hw-laptop-test.sh (16 ok), i18n-test.sh (401 ok), default-agent-test.sh (47 ok), capture-picker-binds-test.sh (1 ok): all pass, 0 failures.
  • Not checked: other Chromebook models, convertibles in tablet mode.

Screenshots

No visible change: adds lid-switch binds for another input device name; nothing on screen changes on existing hardware.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Adds lid-close and lid-open bindings for cros_ec_buttons, using the same commands and locked-session options as the existing lid bindings.

  • ChromeOS EC lid events now run Omarchy’s close and open actions.

Reviews (1) · Last reviewed commit: "Handle the lid on ChromeOS EC laptops li..." · Reviewed by Greptile

@birkskyum
birkskyum merged commit 5ab2f12 into omacom:quattro Nov 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants