You are not logged in.

#1 2013-08-17 09:39:40

nil
Member
Registered: 2012-10-15
Posts: 33

[SOLVED] Awesome WM: Center-align text widget

Example image here. I have a clock widget aligned to the "middle" of the layout by using the default one and then setting

    local layout = wibox.layout.align.horizontal()
    layout:set_left(left_layout)
    layout:set_middle(clockwidget)
    layout:set_right(right_layout)
    mywibox[s]:set_widget(layout)

as per usual in rc.lua (that is, instead of tasklist being in the middle, it's clockwidget). However, as seen in the screencap, aligning to the center doesn't do what I was expecting. I want the clock widget to always be dead center, whereas my current setup has the clock widget center itself depending on (what I think is) the remaining amount of whitespace in the panel. Is there a way to have "absolute" center alignment, not relative?

Last edited by nil (2013-08-19 23:37:22)

Offline

#2 2013-08-19 17:39:31

nil
Member
Registered: 2012-10-15
Posts: 33

Re: [SOLVED] Awesome WM: Center-align text widget

Unfortunately I've made no progress in solving this problem. I can't find the proper documentation to solve this issue and I don't know a better place to ask. sad

Offline

#3 2013-08-19 19:36:03

Wey
Member
Registered: 2011-04-22
Posts: 217

Re: [SOLVED] Awesome WM: Center-align text widget

Hello nil,
I wrote a simple centering layout for awesome-git a year ago, i just tried it and now it seems to be compatible with stable.

http://i.imgur.com/7foq87A.png

See the original thread for the code:

https://bbs.archlinux.org/viewtopic.php … 8#p1100598

Last edited by Wey (2013-08-19 19:36:31)

Offline

#4 2013-08-19 23:36:30

nil
Member
Registered: 2012-10-15
Posts: 33

Re: [SOLVED] Awesome WM: Center-align text widget

Hi Wey, thanks for the code! It worked fantastically.

Offline

Board footer

Powered by FluxBB