polybar: Blocks get under systray even when there is free space in the bar

Is your feature request related to a problem? Please describe.

When one of the blocks (namely modules-right) grows too big, it starts to “get under” the system tray, hiding the rightmost module. However, there is plenty of space between the leftmost module and the modules-left block. I don’t know if this is due to some maximum sizes or padding being forced, but I think it would be great to be able to configure this.

Correctly displayed bar: DeepinScreenshot_select-area_20190724122213

Overlapping the tray: DeepinScreenshot_select-area_20190724122241

As it can be seen, there is still plenty of space between modules-right and modules-left. Why is it not being used?

Why does polybar need this feature?

Current behavior looks bad and wastes space.

Describe the solution you’d like

I don’t know exactly the root cause of this, but the user should be able to define its own margins, paddings, or minimum widths to avoid this effect. Or maybe this are just hardcoded values set too high and can be fixed without user configuration.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (14 by maintainers)

Commits related to this issue

Most upvoted comments

@roobre I may have a fix for #591 over at #1936. Would you mind testing it out? Looking at your description again it seems consistent with the issue in #591. What value for fixed-center were you using?

@claudemuller Hmm, unnecessary overlapping should not happen with fixed-center = false. How big was the gap between the left modules and the right modules when there was overlap? A gap of about 40 pixels is expected, anything else seems like a bug to me.

I would appreciate that 😃

But chances are it is still not fixed since many people still have issues 😞

The systray isn’t polybar. It’s a window placed over polybar, because of that we have many problems. Our current plan is to remove this “temporary” solution and make the systray a real module, once done this problem should be solved. However this is a lot of works, we have to support images in the bar then we have to implement the systray (this isn’t trivial 😕). If I remember well, there are two systray protocols on Linux but I don’t know how it works.

Without the systray, the right block should be hooked on the right and extend on the left. The left block works the same. For the center block this is a little more complicated.

With the systray, the end of polybar should be at the left of the systray but sometimes this is bugged and the end of the bar is under the systray 😕