fix: check vertical after parsing multiple outputs
parent
5144426f0e
commit
dda0cc793e
|
@ -98,6 +98,7 @@
|
||||||
"custom/spotify": {
|
"custom/spotify": {
|
||||||
"format": " {}",
|
"format": " {}",
|
||||||
"max-length": 40,
|
"max-length": 40,
|
||||||
|
"escape": true,
|
||||||
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
"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();
|
setupConfig();
|
||||||
setupCss();
|
setupCss();
|
||||||
|
|
||||||
if (config_["position"] == "right" || config_["position"] == "left") {
|
|
||||||
vertical = true;
|
|
||||||
height_ = 0;
|
|
||||||
width_ = 30;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto wrap = reinterpret_cast<GtkWidget*>(window.gobj());
|
auto wrap = reinterpret_cast<GtkWidget*>(window.gobj());
|
||||||
gtk_widget_realize(wrap);
|
gtk_widget_realize(wrap);
|
||||||
GdkWindow *gdk_window = gtk_widget_get_window(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);
|
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 height = config_["height"].isUInt() ? config_["height"].asUInt() : height_;
|
||||||
auto width = config_["width"].isUInt() ? config_["width"].asUInt() : width_;
|
auto width = config_["width"].isUInt() ? config_["width"].asUInt() : width_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue