mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Happy linter
This commit is contained in:
parent
272c638f7e
commit
a08967e008
@ -500,7 +500,8 @@ const std::tuple<uint8_t, float, std::string, float> waybar::modules::Battery::g
|
|||||||
} else if (status == "Discharging" && total_power_exists && total_energy_exists) {
|
} else if (status == "Discharging" && total_power_exists && total_energy_exists) {
|
||||||
if (total_power != 0) time_remaining = (float)total_energy / total_power;
|
if (total_power != 0) time_remaining = (float)total_energy / total_power;
|
||||||
} else if (status == "Charging" && time_to_full_now_exists) {
|
} else if (status == "Charging" && time_to_full_now_exists) {
|
||||||
if (time_to_full_now_exists && (time_to_full_now != 0)) time_remaining = -(float)time_to_full_now / 1000.0f;
|
if (time_to_full_now_exists && (time_to_full_now != 0))
|
||||||
|
time_remaining = -(float)time_to_full_now / 1000.0f;
|
||||||
// If we've turned positive it means the battery is past 100% and so just report that as no
|
// If we've turned positive it means the battery is past 100% and so just report that as no
|
||||||
// time remaining
|
// time remaining
|
||||||
if (time_remaining > 0.0f) time_remaining = 0.0f;
|
if (time_remaining > 0.0f) time_remaining = 0.0f;
|
||||||
|
@ -102,7 +102,6 @@ void waybar::modules::MPD::setLabel() {
|
|||||||
} else {
|
} else {
|
||||||
label_.hide();
|
label_.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tooltipEnabled()) {
|
if (tooltipEnabled()) {
|
||||||
std::string tooltip_format;
|
std::string tooltip_format;
|
||||||
|
@ -117,7 +117,6 @@ auto Sndio::update() -> void {
|
|||||||
label_.set_markup(text);
|
label_.set_markup(text);
|
||||||
label_.show();
|
label_.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ALabel::update();
|
ALabel::update();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user