mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge branch 'Alexays:master' into workspaces
This commit is contained in:
commit
96a8e5df83
@ -191,7 +191,7 @@ auto waybar::modules::Backlight::update() -> void {
|
|||||||
const uint8_t percent =
|
const uint8_t percent =
|
||||||
best->get_max() == 0 ? 100 : round(best->get_actual() * 100.0f / best->get_max());
|
best->get_max() == 0 ? 100 : round(best->get_actual() * 100.0f / best->get_max());
|
||||||
std::string desc =
|
std::string desc =
|
||||||
fmt::format(fmt::runtime(format_), fmt::arg("percent", std::to_string(percent)),
|
fmt::format(fmt::runtime(format_), fmt::arg("percent", percent),
|
||||||
fmt::arg("icon", getIcon(percent)));
|
fmt::arg("icon", getIcon(percent)));
|
||||||
label_.set_markup(desc);
|
label_.set_markup(desc);
|
||||||
getState(percent);
|
getState(percent);
|
||||||
@ -202,7 +202,7 @@ auto waybar::modules::Backlight::update() -> void {
|
|||||||
}
|
}
|
||||||
if (!tooltip_format.empty()) {
|
if (!tooltip_format.empty()) {
|
||||||
label_.set_tooltip_text(fmt::format(fmt::runtime(tooltip_format),
|
label_.set_tooltip_text(fmt::format(fmt::runtime(tooltip_format),
|
||||||
fmt::arg("percent", std::to_string(percent)),
|
fmt::arg("percent", percent),
|
||||||
fmt::arg("icon", getIcon(percent))));
|
fmt::arg("icon", getIcon(percent))));
|
||||||
} else {
|
} else {
|
||||||
label_.set_tooltip_text(desc);
|
label_.set_tooltip_text(desc);
|
||||||
|
@ -192,7 +192,7 @@ std::string IPC::getSocket1Reply(const std::string& rq) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
response.append(buffer, sizeWritten);
|
response.append(buffer, sizeWritten);
|
||||||
} while (sizeWritten == 8192);
|
} while (sizeWritten > 0);
|
||||||
|
|
||||||
close(SERVERSOCKET);
|
close(SERVERSOCKET);
|
||||||
return response;
|
return response;
|
||||||
|
Loading…
Reference in New Issue
Block a user