Smart installer watchdog#3
Open
fdotcico wants to merge 10 commits into
Open
Conversation
added 10 commits
June 7, 2026 15:40
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.
Summary
Hi, loved you program!
This PR adds an optional smart installer and safety watchdog on top of the existing display_disable binary.
The goal is to improve the setup experience and reduce the risk of being left without an active built-in display when using a MacBook with an external monitor.
What changed
Added scripts/install_smart.sh
Added scripts/auto_enable_builtin_on_external_disconnect.sh
Added scripts/trust_current_external_displays.sh
Added scripts/uninstall_smart.sh
Updated README
Behavior
The smart setup is optional. The existing display_disable binary behavior is not changed.
The watchdog is conservative by default:
If the built-in display is already active, the watchdog does nothing.
If the built-in display is disabled and a trusted external display is present, the watchdog does nothing.
If the built-in display is disabled and no trusted external display is detected, the watchdog waits for the configured number of confirmations before re-enabling the built-in display.
Why
When the built-in display is disabled and the external display is disconnected, macOS may still report a stale or generic external display entry. In that case, the user may be left without the built-in display enabled.
The watchdog provides a safety mechanism for this scenario.
Testing
Tested on macOS with Apple Silicon and an external monitor.
Verified: