feat(Bar): add a warning about minimum height
parent
61e9f0803d
commit
7bca5fd6bd
|
@ -81,7 +81,7 @@
|
||||||
"format": " {}",
|
"format": " {}",
|
||||||
"max-length": 40,
|
"max-length": 40,
|
||||||
"interval": 30, // Remove this if your script is endless and write in loop
|
"interval": 30, // Remove this if your script is endless and write in loop
|
||||||
"exec": "$HOME/.config/waybar/mediaplayer.sh", // Script in resources folder
|
"exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder
|
||||||
"exec-if": "pgrep spotify"
|
"exec-if": "pgrep spotify"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
min-height: 0px;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
|
|
|
@ -110,7 +110,9 @@ void waybar::Bar::layerSurfaceHandleConfigure(void* data,
|
||||||
|
|
||||||
int dummy_width, min_height;
|
int dummy_width, min_height;
|
||||||
o->window.get_size(dummy_width, min_height);
|
o->window.get_size(dummy_width, min_height);
|
||||||
if (o->height_ < min_height) {
|
if (o->height_ < static_cast<uint32_t>(min_height)) {
|
||||||
|
std::cout << fmt::format("Requested height: {} exceeds the minimum \
|
||||||
|
height: {} required by the modules", o->height_, min_height) << std::endl;
|
||||||
o->height_ = min_height;
|
o->height_ = min_height;
|
||||||
}
|
}
|
||||||
std::cout << fmt::format(
|
std::cout << fmt::format(
|
||||||
|
|
Loading…
Reference in New Issue