feat(lid-guard): add lid-close suspension inhibitor#30
Draft
8bury wants to merge 2 commits into
Draft
Conversation
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.
Plugin
8bury/lid-guardplugin.toml)What it does
Lid Guard adds a bar indicator and optional Control Center shortcut for toggling
a lid-close inhibitor. When active, closing the laptop lid does not trigger
systemd-logindsuspension, allowing AI agents, builds, downloads, and otherbackground jobs to keep running.
The plugin does not edit
logind.conf, request elevated privileges, or blockexplicit suspension. It inhibits only
handle-lid-switch.External dependencies
systemctl: checks, stops, and resets the transient user service.systemd-run: createsnoctalia-lid-guard.servicein the current user'sservice manager.
systemd-inhibit: holds thehandle-lid-switchinhibitor while the mode isactive.
sleep: supplies the long-running process held bysystemd-inhibit.The plugin makes no network calls, downloads no code, and writes no files. All
spawned processes are listed above and run as the current user.
Testing
Enabled the plugin from both its Git source and a development checkout.
Added the bar widget and verified inactive, active, busy, and tooltip state
rendering.
Dispatched
status,enable, anddisableto the service entry over IPC.Confirmed
noctalia-lid-guard.servicebecomes active after enabling.Confirmed
systemd-inhibit --listreports a blockinghandle-lid-switchinhibitor owned by Noctalia Lid Guard.Confirmed disabling removes the inhibitor and leaves the service inactive.
Ran the community repository validator successfully across all 16 manifests.
Ran all 19 validator unit tests successfully.
Left Lid Guard disabled after testing.
Tested on Niri
Tested on Hyprland
Tested on Sway
Tested on another compositor:
Noctalia version tested against: 5.0.0
Plugin API level: 3
Screenshots / Videos
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows theREADME template, documents
every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.
thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.understand that language well enough to review and maintain it (no non-English translations are included).
catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.