Skip to content

Commit 6946288

Browse files
committed
PR #1485 review
1 parent 9f337db commit 6946288

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/modules/temperature.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33

44
waybar::modules::Temperature::Temperature(const std::string& id, const Json::Value& config)
55
: ALabel(config, "temperature", id, "{temperatureC}°C", 10) {
6-
if (config_["format"].asString().empty() && config_["format-critical"].asString().empty()) {
7-
throw std::runtime_error("Format configuration is not defined");
8-
} else if (config_["format"].asString().empty()) {
9-
format_.clear();
10-
}
116
if (config_["hwmon-path"].isString()) {
127
file_path_ = config_["hwmon-path"].asString();
138
} else if (config_["hwmon-path-abs"].isString() && config_["input-filename"].isString()) {
@@ -40,8 +35,7 @@ auto waybar::modules::Temperature::update() -> void {
4035
label_.get_style_context()->remove_class("critical");
4136
}
4237

43-
if(format.empty())
44-
{
38+
if(format.empty()) {
4539
event_box_.hide();
4640
return;
4741
} else {

0 commit comments

Comments
 (0)