Skip to content

feat(windows): disable Surface Laptop power button - #700

Merged
DevSecNinja merged 1 commit into
mainfrom
devsecninja-disable-surface-power-button
Aug 11, 2026
Merged

feat(windows): disable Surface Laptop power button#700
DevSecNinja merged 1 commit into
mainfrom
devsecninja-disable-surface-power-button

Conversation

@DevSecNinja

Copy link
Copy Markdown
Owner

Accidental power-button presses are easy on Surface Laptop keyboards because the button sits next to Delete. This prevents those presses from suspending or shutting down opinionated-profile workstations.

Changes

  • Detect Microsoft Surface Laptop and Surface Laptop Studio hardware before changing system power settings.
  • Set the active plan's AC and battery power-button actions to Do nothing in the Windows full profile.
  • Leave non-Surface devices and light-profile installations unchanged.
  • Add isolated Pester coverage for hardware detection, powercfg arguments, WhatIf, and failure propagation.
  • Document the opinionated Windows behavior.

Validation

  • Targeted Pester suite: 10 tests passed.
  • Chezmoi configuration, script, and dry-run apply checks passed.
  • PSScriptAnalyzer and pre-commit hooks passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6c0af4ce-01e4-448b-bc3c-6f7d7ee92610
@DevSecNinja
DevSecNinja enabled auto-merge (squash) August 11, 2026 09:02
@DevSecNinja
DevSecNinja merged commit 390534d into main Aug 11, 2026
19 checks passed
@DevSecNinja
DevSecNinja deleted the devsecninja-disable-surface-power-button branch August 11, 2026 09:10
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.

1 participant