Skip to content

Commit 959777c

Browse files
authored
Merge pull request #4028 from thyttan/widminbate
widminbate: lower battery threshold to appear 30%->10%
2 parents 6d88491 + 5d1cf8b commit 959777c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

apps/widminbate/ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
0.03: Do not clear outside of widget bar
44
0.04: Fork `widminbat`->`widminbate`. Only use the system theme foreground
55
colour.
6-
0.05: Fix broken fork which removed the `update` function
6+
0.05: Fix broken fork which removed the `update` function
7+
0.06: The widget now shows only when battery level is 10% or lower

apps/widminbate/metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{ "id": "widminbate",
22
"name": "Extra Minimal Battery",
33
"shortName":"ExtraMinBat",
4-
"version":"0.05",
4+
"version":"0.06",
55
"author": "thyttan",
6-
"description": "An extra minimal (only use system theme foreground colour) version of the battery widget that only appears if the battery is running low (below 30%)",
6+
"description": "An extra minimal (only use system theme foreground colour) version of the battery widget that only appears if the battery is running low (10% or less)",
77
"icon": "widget.png",
88
"type": "widget",
99
"tags": "widget,battery,minimal,monochrome",

apps/widminbate/widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
let getWidth = function() {
3-
return E.getBattery() <= 30 || Bangle.isCharging() ? 40 : 0;
3+
return E.getBattery() <= 10 || Bangle.isCharging() ? 40 : 0;
44
};
55
WIDGETS.minbate={area:"tr",width:getWidth(),draw:function() {
66
if(this.width < 40) return;
@@ -26,4 +26,4 @@
2626
if(widget) widget.update();
2727
}, 10*60*1000);
2828
Bangle.on('charging', () => WIDGETS.minbate.update());
29-
}
29+
}

0 commit comments

Comments
 (0)