mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix: check vertical after parsing multiple outputs
This commit is contained in:
parent
5144426f0e
commit
dda0cc793e
@ -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
|
||||
}
|
||||
}
|
||||
|
11
src/bar.cpp
11
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<GtkWidget*>(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_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user