mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(temperature): default thermal zone
This commit is contained in:
parent
7d6079bb06
commit
6d2dcd8ac7
@ -48,7 +48,7 @@
|
|||||||
"format": "{}% "
|
"format": "{}% "
|
||||||
},
|
},
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"thermal-zone": 2,
|
// "thermal-zone": 2,
|
||||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||||
"critical-threshold": 80,
|
"critical-threshold": 80,
|
||||||
// "format-critical": "{temperatureC}°C ",
|
// "format-critical": "{temperatureC}°C ",
|
||||||
|
@ -7,7 +7,7 @@ waybar::modules::Temperature::Temperature(const std::string& id, const Json::Val
|
|||||||
file_path_ = config_["hwmon-path"].asString();
|
file_path_ = config_["hwmon-path"].asString();
|
||||||
} else {
|
} else {
|
||||||
auto zone =
|
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);
|
file_path_ = fmt::format("/sys/class/thermal/thermal_zone{}/temp", zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user