/WinClamshellMode

Keep the laptop awake when the lid is closed if an external display is connected, and put it to sleep when the external display is disconnected.

Primary LanguageCMIT LicenseMIT

Clamshell Mode for Windows Laptops

This tool keeps the laptop awake when the lid is closed if an external display is connected, and puts it to sleep when the external display is disconnected. It mimics the Clamshell Mode feature found in MacBooks.

How to Use?

You can either build the Visual Studio project yourself or download a build generated by GitHub Actions from the Releases section. Place the executable in the shell:startup directory (which can be opened in Explorer). After the first launch, it will ask for the internal display DeviceID.

To simplify the DeviceID selection process, it is advisable to disconnect all external monitors before launching the application. This will ensure that only one DeviceID appears in the selection menu, corresponding to the internal display.