Fix internal monitor disable for systems where built-in display is not eDP-1#5511
Merged
dhh merged 1 commit intobasecamp:devfrom Apr 30, 2026
Merged
Conversation
Detect the internal monitor name dynamically at runtime instead of hardcoding eDP-1 in a static toggle conf file. Uses the same pattern as omarchy-hyprland-monitor-internal-mirror. Fixes basecamp#5443
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Hyprland “internal monitor disable” toggle to dynamically detect the laptop panel output name at runtime (via hyprctl monitors -j), addressing systems where the built-in display is not eDP-1 (Fixes #5443).
Changes:
- Detect the internal monitor output name dynamically in
omarchy-hyprland-monitor-internal. - Write the toggle flag config directly using the detected output name and reload Hyprland.
- Remove the now-unneeded static toggle config
default/hypr/toggles/internal-monitor-disable.conf.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| default/hypr/toggles/internal-monitor-disable.conf | Removes the hardcoded monitor=eDP-1,disable static toggle source. |
| bin/omarchy-hyprland-monitor-internal | Computes the internal output name dynamically and writes the state toggle config directly. |
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Glad to see the dynamic detection actually working 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
default/hypr/toggles/internal-monitor-disable.confhardcodesmonitor=eDP-1,disable. On laptops with hybrid GPUs (e.g. Intel iGPU + NVIDIA dGPU), the iGPU claimseDP-1as a disconnected connector while the actual built-in panel is enumerated aseDP-2or higher. Hyprland silently accepts the config but does nothing, so the toggle fires the notification but the display stays on.Fixes #5443.
Solution
Detect the internal monitor name dynamically at runtime using
hyprctl monitors -j, following the same pattern already used inomarchy-hyprland-monitor-internal-mirror. Thedisable()function now writes the toggle flag file directly with the detected name instead of copying the static conf.The static
default/hypr/toggles/internal-monitor-disable.confis removed — it is no longer needed.Testing
Tested on a system where the built-in display is
eDP-2(Intel + NVIDIA hybrid GPU). Both the lid switch and the keyboard shortcut correctly disable and re-enable the internal monitor.AI Disclosure
Claude assisted with identifying the pattern in the
omarchy-hyprland-monitor-internal-mirrorscript. I wasn't 100% happy with it's attempt at fixing it so I refactored it to match the style in the mirror script.