Search code examples
luaconfigawesome-wm

wibar wibox Align problem. Section doesn't align to the right anymore after changing configs back to normal


I'm trying to figure out what happened to my wibar.
I've been fiddling with my themes.lua config, but in the end I ended up leaving it as it was. Although the behavior hasn't returned back to what it was.

Starting point:

I use arcolinux, and I started with their default config for the theme "multicolor".
That means:
- 2 bars, 1@top 1@bottom
- tasklist + clock at the bottom bar
- taglist +widgets at the top

The normal behavior was that the tags aligned to the left side of the bar, and the widgets to the right.
That left a lot of empty space that I wanted to use dynamically for my tasklist, without the widgets going out of screen or getting covered by the tasklist.

Problem

I wanted to keep the widgets aligned to the right, and the tags to the left.
The problem is that I removed the tasklist from the top bar and now the widgets do not align to the right anymore.
Not even if I set them to align specifically to the right.

Imgur

What I tried

I have tried several wibox.align types, but none of them seemed to work.
I have also tried leaving only nil, between the two sections (which was the default solution)... but it still doesn't work.
I also tried creating a middle section set to wibox.align.flex.horizontal, like it was proposed in another question... but doesn't work either.
At some point I set a width of 50 to some variable related to the tasklist wibox (can't remember the name), but that variable is NOT there anymore. Double, triple and quadruple checked.

This is the link to the theme.lua as it is right now (default with some commented modifications).
The bars are right at the bottom of the file, just before it ends.

Question

How do I fix this weird behavior?
Everywhere I look it says my current config file shouldn't behave like this.
There is nothing left telling the right wibox to align to the left, and it ignores any config options asking it to align to the right.


Solution

  •     s.mywibox:setup {
            layout = wibox.layout.fixed.horizontal,
    

    A fixed layout places its widgets just next to each other. In the default config, this is a wibox.layout.align.horizontal.