mirror of
https://github.com/morgan9e/gnome-shell-extension-freon
synced 2026-04-15 00:44:22 +09:00
hddtemp daemon mode doesn't separate entries by newlines, but by double separators.
This commit is contained in:
@@ -148,7 +148,18 @@ function parseVoltageLine(label, value) {
|
||||
}
|
||||
|
||||
function parseHddTempOutput(txt, sep) {
|
||||
let hddtemp_output = txt.split("\n").filter(function(e){ return e; });
|
||||
let hddtemp_output = [];
|
||||
if (txt.indexOf((sep+sep), txt.length - (sep+sep).length))
|
||||
{
|
||||
hddtemp_output = txt.split(sep+sep);
|
||||
}
|
||||
else
|
||||
{
|
||||
hddtemp_output = txt.split("\n");
|
||||
}
|
||||
|
||||
hddtemp_output = hddtemp_output.filter(function(e){ return e; });
|
||||
|
||||
let sensors = new Array();
|
||||
for each(let line in hddtemp_output)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user