mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
UI optimization, #5
This commit is contained in:
@@ -73,22 +73,21 @@ const BumblebeeNvidiaUtil = new Lang.Class({
|
|||||||
get temp() {
|
get temp() {
|
||||||
let key = 'bumblebee-nvidia'
|
let key = 'bumblebee-nvidia'
|
||||||
let label = this._label ? this._label : _('Bumblebee + NVIDIA');
|
let label = this._label ? this._label : _('Bumblebee + NVIDIA');
|
||||||
if(!this._active || !this._output)
|
if(this._active && this._output){
|
||||||
return [{label: key, temp: null, displayName: label}];
|
// GPU Current Temp : 37 C
|
||||||
// GPU Current Temp : 37 C
|
for each(let line in this._output) {
|
||||||
for each(let line in this._output) {
|
if(!line)
|
||||||
if(!line)
|
continue;
|
||||||
continue;
|
let r;
|
||||||
let r;
|
if(line.indexOf('GPU Current Temp') > 0)
|
||||||
if(line.indexOf('GPU Current Temp') > 0)
|
return [{
|
||||||
return [{
|
label: key,
|
||||||
label: key,
|
temp: (r = /[\s]*GPU Current Temp[\s]*:[\s]*(\d{1,3}).*/.exec(line)) ? parseFloat(r[1]) : null,
|
||||||
temp: (r = /[\s]*GPU Current Temp[\s]*:[\s]*(\d{1,3}).*/.exec(line)) ? parseFloat(r[1]) : null,
|
displayName: label
|
||||||
displayName: label
|
}];
|
||||||
}];
|
}
|
||||||
}
|
}
|
||||||
|
return [{label: key, temp: null, displayName: label}];
|
||||||
return [];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function(){
|
destroy: function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user