From dda0cc793e4f7b6cc2660fc4c53a39f41a524fa2 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 25 Mar 2019 21:02:00 +0100 Subject: [PATCH] fix: check vertical after parsing multiple outputs --- resources/config | 1 + src/bar.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/config b/resources/config index 28cceb98..06992478 100644 --- a/resources/config +++ b/resources/config @@ -98,6 +98,7 @@ "custom/spotify": { "format": " {}", "max-length": 40, + "escape": true, "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder } } diff --git a/src/bar.cpp b/src/bar.cpp index 820e54b8..d042b24e 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -28,12 +28,6 @@ waybar::Bar::Bar(const Client& client, setupConfig(); setupCss(); - if (config_["position"] == "right" || config_["position"] == "left") { - vertical = true; - height_ = 0; - width_ = 30; - } - auto wrap = reinterpret_cast(window.gobj()); gtk_widget_realize(wrap); GdkWindow *gdk_window = gtk_widget_get_window(wrap); @@ -101,6 +95,11 @@ void waybar::Bar::initBar() }; zwlr_layer_surface_v1_add_listener(layer_surface, &layer_surface_listener, this); + if (config_["position"] == "right" || config_["position"] == "left") { + height_ = 0; + width_ = 30; + } + auto height = config_["height"].isUInt() ? config_["height"].asUInt() : height_; auto width = config_["width"].isUInt() ? config_["width"].asUInt() : width_;