[gnome] Update gnome extensions
This commit is contained in:
Binary file not shown.
@ -11,9 +11,10 @@
|
||||
"45",
|
||||
"46",
|
||||
"47",
|
||||
"48"
|
||||
"48",
|
||||
"49"
|
||||
],
|
||||
"url": "https://github.com/corecoding/Vitals",
|
||||
"uuid": "Vitals@CoreCoding.com",
|
||||
"version": 71
|
||||
"version": 73
|
||||
}
|
||||
@ -230,16 +230,20 @@ export const Sensors = GObject.registerClass({
|
||||
let hertz = (sum / freqs.length) * 1000 * 1000;
|
||||
this._returnValue(callback, 'Frequency', hertz, 'processor', 'hertz');
|
||||
|
||||
//let max_hertz = Math.getMaxOfArray(freqs) * 1000 * 1000;
|
||||
//this._returnValue(callback, 'Boost', max_hertz, 'processor', 'hertz');
|
||||
let max_hertz = freqs.reduce((a, b) => Math.max(a, b)) * 1000 * 1000;
|
||||
this._returnValue(callback, 'Max frequency', max_hertz, 'processor', 'hertz');
|
||||
let min_hertz = freqs.reduce((a, b) => Math.min(a, b)) * 1000 * 1000;
|
||||
this._returnValue(callback, 'Min frequency', min_hertz, 'processor', 'hertz');
|
||||
}).catch(err => { });
|
||||
// if frequency scaling is enabled, cpu-freq reports
|
||||
} else if (Object.values(this._last_processor['speed']).length > 0) {
|
||||
let sum = this._last_processor['speed'].reduce((a, b) => a + b);
|
||||
let hertz = (sum / this._last_processor['speed'].length) * 1000;
|
||||
this._returnValue(callback, 'Frequency', hertz, 'processor', 'hertz');
|
||||
//let max_hertz = Math.getMaxOfArray(this._last_processor['speed']) * 1000;
|
||||
//this._returnValue(callback, 'Boost', max_hertz, 'processor', 'hertz');
|
||||
let max_hertz = this._last_processor['speed'].reduce((a, b) => Math.max(a, b)) * 1000;
|
||||
this._returnValue(callback, 'Max frequency', max_hertz, 'processor', 'hertz');
|
||||
let min_hertz = this._last_processor['speed'].reduce((a, b) => Math.min(a, b)) * 1000;
|
||||
this._returnValue(callback, 'Min frequency', min_hertz, 'processor', 'hertz');
|
||||
}
|
||||
}
|
||||
|
||||
@ -455,7 +459,7 @@ export const Sensors = GObject.registerClass({
|
||||
this._returnValue(callback, 'Energy (now)', output['ENERGY_NOW'], 'battery', 'watt-hour');
|
||||
}
|
||||
|
||||
if ('ENERGY_FULL' in output && 'ENERGY_NOW' in output && 'POWER_NOW' in output && output['POWER_NOW'] > 0 && 'STATUS' in output && (output['STATUS'] == 'Charging' || output['STATUS'] == 'Discharging')) {
|
||||
if ('ENERGY_FULL' in output && 'ENERGY_NOW' in output && 'POWER_NOW' in output && output['POWER_NOW'] !== 0 && 'STATUS' in output && (output['STATUS'] == 'Charging' || output['STATUS'] == 'Discharging')) {
|
||||
|
||||
let timeLeft = 0;
|
||||
|
||||
@ -463,7 +467,7 @@ export const Sensors = GObject.registerClass({
|
||||
if (output['STATUS'] == 'Charging') {
|
||||
timeLeft = ((output['ENERGY_FULL'] - output['ENERGY_NOW']) / output['POWER_NOW']);
|
||||
} else {
|
||||
timeLeft = (output['ENERGY_NOW'] / output['POWER_NOW']);
|
||||
timeLeft = (output['ENERGY_NOW'] / Math.abs(output['POWER_NOW']));
|
||||
}
|
||||
|
||||
// don't process Infinity values
|
||||
@ -644,7 +648,7 @@ export const Sensors = GObject.registerClass({
|
||||
if(vendor === "0x1002") {
|
||||
// read GPU usage and create group lebel for card
|
||||
new FileModule.File('/sys/class/drm/card'+i+'/device/gpu_busy_percent').read().then(value => {
|
||||
// create group
|
||||
// create group
|
||||
this._returnGpuValue(callback, 'Graphics', parseInt(value) * 0.01, typeName + '-group', 'percent');
|
||||
this._returnGpuValue(callback, 'Vendor', "AMD", typeName, 'string');
|
||||
this._returnGpuValue(callback, 'Usage', parseInt(value) * 0.01, typeName, 'percent');
|
||||
|
||||
Reference in New Issue
Block a user