fix(temperature): default thermal zone

This commit is contained in:
Alex 2019-03-14 14:01:10 +01:00
parent 7d6079bb06
commit 6d2dcd8ac7
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@
"format": "{}% "
},
"temperature": {
"thermal-zone": 2,
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C ",

View File

@ -7,7 +7,7 @@ waybar::modules::Temperature::Temperature(const std::string& id, const Json::Val
file_path_ = config_["hwmon-path"].asString();
} else {
auto zone =
config_["thermal-zone"].isInt() ? config_["thermal-zone"].asInt() : 1;
config_["thermal-zone"].isInt() ? config_["thermal-zone"].asInt() : 0;
file_path_ = fmt::format("/sys/class/thermal/thermal_zone{}/temp", zone);
}