-
-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wlr/taskbar pushes the modules on the right over the screen when I open windows. #917
Comments
A solution to this would be a max-length option, which limits the total width of the taskbar module. Some nice to have options to possibly implement along side:
|
Also this is related to this issue: #882 |
Any updates on this? |
Would be really nice to have this<3 |
1 similar comment
Would be really nice to have this<3 |
Are there any workarounds for that? |
I think the obvious solution would be to have some kind of scroll box. |
Why? The behaviour in most (all?) panels is to shrink window buttons to fit. |
It's not sustainable. If the button is too small you can't read or see anything and then what? |
|
By applying the patch below, titles can shrink, although icons don't. diff --git a/src/bar.cpp b/src/bar.cpp
index d0a187c6..4b667b90 100644
--- a/src/bar.cpp
+++ b/src/bar.cpp
@@ -798,7 +798,7 @@ auto waybar::Bar::setupWidgets() -> void {
if (config["fixed-center"].isBool() ? config["fixed-center"].asBool() : true) {
box_.set_center_widget(center_);
} else {
- box_.pack_start(center_, true, false);
+ box_.pack_start(center_, true, true);
}
box_.pack_end(right_, false, false);
diff --git a/src/modules/wlr/taskbar.cpp b/src/modules/wlr/taskbar.cpp
index f4b137c0..bfe182c3 100644
--- a/src/modules/wlr/taskbar.cpp
+++ b/src/modules/wlr/taskbar.cpp
@@ -271,6 +271,9 @@ Task::Task(const waybar::Bar &bar, const Json::Value &config, Taskbar *tbar,
button.set_relief(Gtk::RELIEF_NONE);
+ text_before_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
+ text_after_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
+
content_.add(text_before_);
content_.add(icon_);
content_.add(text_after_); |
Considering potential compatibility with #2647, mouse wheel scrolling would be unavailable. An alternative is to stack icons behind each other when the bar becomes full, unstack on mouseover and scroll via mouse position on taskbar. |
A fairly simple workaround I've applied to my configuration for now is using the
This regular expression will match any format output over 16 characters, and truncate it down to those characters plus an ellipsis. 16 was chosen kind of randomly by me, because it fits decently onto my screen. If there's a LOT of windows this doesn't ultimately prevent them from flowing out, but it at least puts a boundary on individual windows. |
Any updates on this? Looks like there's been no movement, not even an incorporation of this patch: #917 (comment) |
demo
The text was updated successfully, but these errors were encountered: