powermanager - Adds setting for widget
parent
b334b14f40
commit
ce46760922
|
|
@ -24,6 +24,12 @@
|
||||||
'title': 'Power Manager'
|
'title': 'Power Manager'
|
||||||
},
|
},
|
||||||
"< Back" : back,
|
"< Back" : back,
|
||||||
|
'Show widget': {
|
||||||
|
value: !!settings.widget,
|
||||||
|
onchange: v => {
|
||||||
|
writeSettings("widget", v);
|
||||||
|
}
|
||||||
|
},
|
||||||
'Monotonic percentage': {
|
'Monotonic percentage': {
|
||||||
value: !!settings.forceMonoPercentage,
|
value: !!settings.forceMonoPercentage,
|
||||||
onchange: v => {
|
onchange: v => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
/* run widgets in their own function scope so they don't interfere with
|
/* run widgets in their own function scope so they don't interfere with
|
||||||
currently-running apps */
|
currently-running apps */
|
||||||
(() => {
|
(() => {
|
||||||
|
const s = require("Storage").readJSON("powermanager.json") || {};
|
||||||
|
|
||||||
|
if (!s.widget) return;
|
||||||
|
|
||||||
const GU = require("graphics_utils");
|
const GU = require("graphics_utils");
|
||||||
const APPROX_IDLE = 0.3;
|
const APPROX_IDLE = 0.3;
|
||||||
const APPROX_HIGH_BW_BLE = 0.5;
|
const APPROX_HIGH_BW_BLE = 0.5;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue