From 7bca5fd6bdd18680431267691ccdc1b75145969b Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 2 Nov 2018 12:35:26 +0100 Subject: [PATCH] feat(Bar): add a warning about minimum height --- resources/config | 2 +- resources/style.css | 2 +- src/bar.cpp | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/config b/resources/config index 680b450..4068991 100644 --- a/resources/config +++ b/resources/config @@ -81,7 +81,7 @@ "format": " {}", "max-length": 40, "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" } } diff --git a/resources/style.css b/resources/style.css index d9273f3..1e9be37 100644 --- a/resources/style.css +++ b/resources/style.css @@ -3,7 +3,7 @@ border-radius: 0; font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 13px; - min-height: 0px; + min-height: 0; } window#waybar { diff --git a/src/bar.cpp b/src/bar.cpp index da10180..4793e11 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -110,7 +110,9 @@ void waybar::Bar::layerSurfaceHandleConfigure(void* data, int dummy_width, min_height; o->window.get_size(dummy_width, min_height); - if (o->height_ < min_height) { + if (o->height_ < static_cast(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; } std::cout << fmt::format(