mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-14 00:14:14 +09:00
fixed issue #26
This commit is contained in:
@@ -54,7 +54,7 @@ CpuTemperature.prototype = {
|
||||
|
||||
_detectSensors: function(){
|
||||
//detect if sensors is installed
|
||||
let ret = GLib.spawn_command_line_sync("which sensor");
|
||||
let ret = GLib.spawn_command_line_sync("which sensors");
|
||||
if ( (ret[0]) && (ret[3] == 0) ) {//if yes
|
||||
return ret[1].toString().split("\n", 1)[0];//find the path of the sensors
|
||||
}
|
||||
@@ -349,7 +349,7 @@ CpuTemperature.prototype = {
|
||||
_formatTemp: function(t) {
|
||||
//uncomment the next line to display temperature in Fahrenheit
|
||||
//return this._toFahrenheit(t).toString()+"\u1d3cF";
|
||||
return (Math.round(t*10)/10).toString()+"\u1d3cC";
|
||||
return (Math.round(t*10)/10).toFixed(1).toString()+"\u1d3cC";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user