AlwaysOn@Krivetochka v1.2.0: Deactivating the applet before turning off the PC#8379
AlwaysOn@Krivetochka v1.2.0: Deactivating the applet before turning off the PC#8379Krivetochka wants to merge 3 commits intolinuxmint:masterfrom
Conversation
Krivetochka
commented
Feb 26, 2026
- Code refactoring.
- Now, when the PC is turned off, the settings that were affected by the applet are restored.
- Added the ability to control settings when closing the laptop lid.
- Simplified applet settings.
* Code refactoring. * Now, when the PC is turned off, the settings that were affected by the applet are restored. * Added the ability to control settings when closing the laptop lid. * Simplified applet settings.
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect will not replace a normal review.Found 3 potential issue(s):
|
There was a problem hiding this comment.
Pull request overview
This pull request upgrades the AlwaysOn applet to version 1.2.0 with significant code refactoring and new functionality. The applet prevents computers from going to sleep when activated. The changes improve code maintainability by replacing a global state variable with proper instance state management, add automatic settings restoration on PC shutdown, introduce laptop lid-close action control, and simplify the settings interface.
Changes:
- Refactored state management from global
switchervariable to instance-based_isActiveproperty with dedicated activation/deactivation methods - Added DBus signal subscription to detect system shutdown and automatically restore original power settings before shutdown completes
- Added new lid-close action setting that prevents laptop from sleeping when lid is closed (when applet is active)
- Implemented proper lifecycle cleanup in
on_applet_removed_from_panel()including signal disconnection, keybinding removal, and settings finalization
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| applet.js | Major refactoring: replaced global state with instance properties, extracted activation/deactivation logic into separate methods, added shutdown detection via PrepareForShutdown DBus signal, implemented proper cleanup in on_applet_removed_from_panel(), added lid-close action support |
| settings-schema.json | Removed change-affected-settings toggle and its dependencies, added lid-close-action setting, reorganized settings order (moved keybinding to later section) |
| metadata.json | Version bumped from 1.1.0 to 1.2.0 |
| po/*.po | Updated POT-Creation-Date timestamps, added two new untranslated strings for new/changed settings descriptions, adjusted line number references to match refactored code |
| po/AlwaysOn@krivetochka.pot | Updated version to 1.2.0, updated POT-Creation-Date, added entries for new settings strings |