You are not logged in.

#1 2014-04-03 11:31:41

C. M. Harlequin
Member
From: Australia
Registered: 2011-12-23
Posts: 35

Awesome WM: Widget diplay problem; muti-widget container?

Hey Awesome WM users, is there anyway I can get multi-widget containers for formatting purposes? Maybe I'm using the wrong libraries...

Here's what I'm trying to achieve:

Widgets.jpg

For example:

-- Battery Widget
wibattery_text = wibox.widget.textbox()
vicious.register(wibattery_text, vicious.widgets.bat, " $2% ", 2, "BAT1")

wibattery = wibox.widget.background()
wibattery:set_widget(wibattery_text)
wibattery:set_bg(beautiful.battery_widget_bg)

This works well enough for setting BG of a textbox widget, except when I would like the coloured area to extend to and icon widget and a partially transparent separator. If I also had the following, for example:

wibattery_icon = wibox.widget.imagebox()
wibattery_icon:set_image(beautiful.battery_100)

I would have to have three background containers with the same markup; one for text, icon and separator, respectively.  That's an awfully (no pun intended) redundant way of doing it.

Any ideas?

~ C. M.

Last edited by C. M. Harlequin (2014-04-03 11:35:16)


διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.

Offline

#2 2014-04-03 11:59:03

C. M. Harlequin
Member
From: Australia
Registered: 2011-12-23
Posts: 35

Re: Awesome WM: Widget diplay problem; muti-widget container?

An additional note:

blingbling.text_box solves half of my problem by allowing formatting variables (it also seems more flexible too); if I had an imagebox equivalent I could just add them each directly, and set the markup in theme.lua, without the need for a formatting container.

Is there such a thing?


διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.

Offline

Board footer

Powered by FluxBB