mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 14:42:29 +02:00
Fix clang-format to src/modules/temperature.cpp
This commit is contained in:
@ -102,9 +102,10 @@ float waybar::modules::Temperature::getTemperature() {
|
|||||||
|
|
||||||
auto zone = config_["thermal-zone"].isInt() ? config_["thermal-zone"].asInt() : 0;
|
auto zone = config_["thermal-zone"].isInt() ? config_["thermal-zone"].asInt() : 0;
|
||||||
|
|
||||||
if (sysctlbyname(fmt::format("hw.acpi.thermal.tz{}.temperature", zone).c_str(), &temp, &size, NULL, 0) != 0) {
|
if (sysctlbyname(fmt::format("hw.acpi.thermal.tz{}.temperature", zone).c_str(), &temp, &size,
|
||||||
throw std::runtime_error(
|
NULL, 0) != 0) {
|
||||||
fmt::format("sysctl hw.acpi.thermal.tz{}.temperature or dev.cpu.{}.temperature failed", zone, zone));
|
throw std::runtime_error(fmt::format(
|
||||||
|
"sysctl hw.acpi.thermal.tz{}.temperature or dev.cpu.{}.temperature failed", zone, zone));
|
||||||
}
|
}
|
||||||
auto temperature_c = ((float)temp - 2732) / 10;
|
auto temperature_c = ((float)temp - 2732) / 10;
|
||||||
return temperature_c;
|
return temperature_c;
|
||||||
|
Reference in New Issue
Block a user