mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(Battery): replace spaces w/ dashes
This commit is contained in:
parent
d40cc6f23a
commit
c8821a5e7f
@ -165,9 +165,9 @@ auto waybar::modules::Battery::update() -> void {
|
|||||||
}
|
}
|
||||||
// Transform to lowercase
|
// Transform to lowercase
|
||||||
std::transform(status.begin(), status.end(), status.begin(), ::tolower);
|
std::transform(status.begin(), status.end(), status.begin(), ::tolower);
|
||||||
// Replace space with underscore
|
// Replace space with dash
|
||||||
std::transform(status.begin(), status.end(), status.begin(), [](char ch) {
|
std::transform(status.begin(), status.end(), status.begin(), [](char ch) {
|
||||||
return ch == ' ' ? '_' : ch;
|
return ch == ' ' ? '-' : ch;
|
||||||
});
|
});
|
||||||
auto format = format_;
|
auto format = format_;
|
||||||
auto state = getState(capacity, true);
|
auto state = getState(capacity, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user