Skip to content

batterymonitor@pdcurtis: add support for multiple alert levels in battery monitor#8360

Draft
hthienloc wants to merge 1 commit intolinuxmint:masterfrom
hthienloc:batterymonitor
Draft

batterymonitor@pdcurtis: add support for multiple alert levels in battery monitor#8360
hthienloc wants to merge 1 commit intolinuxmint:masterfrom
hthienloc:batterymonitor

Conversation

@hthienloc
Copy link
Contributor

@hthienloc hthienloc commented Feb 21, 2026

  • Introduced a new configuration option to allow users to specify a comma-separated list of battery percentages for alerts.
  • The first percentage in the list is linked to the existing warning color and slider control.
  • Updated settings schema to include the new alertPercentages field.
  • Enhanced the CHANGELOG to reflect the new feature and its implications.

#8240

- Introduced a new configuration option to allow users to specify a comma-separated list of battery percentages for alerts.
- The first percentage in the list is linked to the existing warning color and slider control.
- Updated settings schema to include the new alertPercentages field.
- Enhanced the CHANGELOG to reflect the new feature and its implications.
@github-actions
Copy link
Contributor

Pattern Check Results

Found 14 potential issue(s):

⚠️ sync_file_get_contents

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:672

let capacityValue = GLib.file_get_contents(capacityPath)[1];

Synchronous file_get_contents() blocks the main loop.
Use Gio.File.load_contents_async() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:678

let stateValue = GLib.file_get_contents(statePath)[1];

Synchronous file_get_contents() blocks the main loop.
Use Gio.File.load_contents_async() instead.

⚠️ sync_file_test

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:695

GLib.file_test(customPath, GLib.FileTest.EXISTS) &&

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:696

GLib.file_test(customPath, GLib.FileTest.IS_DIR)

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:699

GLib.file_test(

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:703

GLib.file_test(customPath + "/status", GLib.FileTest.EXISTS)

file_test() is a synchronous stat call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

⚠️ sync_file_query_exists

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:400

batteryCapacityFile.query_exists(null) &&

query_exists() is a synchronous call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:401

batteryStatusFile.query_exists(null)

query_exists() is a synchronous call that can block on slow/network filesystems.
Prefer attempting the operation and handling a Gio.IOErrorEnum.NOT_FOUND error instead.

⚠️ lang_bind

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:577

Lang.bind(this, function (event) {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:588

Lang.bind(this, function (event) {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:609

Lang.bind(this, function (event) {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:620

Lang.bind(this, function (event) {

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:652

Lang.bind(this, this.on_slider_changed)

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.

batterymonitor@pdcurtis/files/batterymonitor@pdcurtis/5.4/applet.js:1016

Lang.bind(this, this.updateLoop)

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

@rcalixte rcalixte marked this pull request as draft February 21, 2026 15:43
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