Skip to content

feat: handle laptop lid state in brightness-display#5815

Open
Acoowa wants to merge 1 commit into
basecamp:devfrom
Acoowa:fix-lid-wake
Open

feat: handle laptop lid state in brightness-display#5815
Acoowa wants to merge 1 commit into
basecamp:devfrom
Acoowa:fix-lid-wake

Conversation

@Acoowa
Copy link
Copy Markdown

@Acoowa Acoowa commented May 14, 2026

Overview

This PR improves the system wake behavior for laptop users. Currently, omarchy-system-wake (via omarchy-brightness-display) unconditionally enables all displays. This causes the internal laptop screen to turn on even when the lid is closed, which is often undesirable when using an external monitor.

Changes

  • Added a check for the laptop lid state using /proc/acpi/button/lid/.
  • Dynamically detects the internal monitor name (e.g., eDP-1) using hyprctl.
  • If the lid is closed and an external monitor is connected, the internal display is disabled before triggering DPMS.
  • If the lid is open, it ensures the internal display is re-enabled with preferred settings.
  • Added a fallback to ensure the script doesn't break if jq is not installed or if it's running on a desktop without a lid sensor.

Why this is needed

When a laptop is docked or connected to a TV, waking the system shouldn't light up the screen under the closed lid. This prevents "ghost" windows from being placed on an invisible screen and saves power/heat.

Testing

Tested on a laptop with an external monitor setup.

  • Lid closed + Wake: Only external monitor turns on.
  • Lid open + Wake: Both monitors turn on.

Copilot AI review requested due to automatic review settings May 14, 2026 14:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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