You are not logged in.

#1 2010-07-10 21:44:40

Diod
Member
Registered: 2010-02-06
Posts: 11

AwesomeWM progressbar widget issue

Hi,

I'm moving from KDE to Awesome and configuring awesome has been easy enough. I'm running into an issue with the progressbar widget though.

As you can see in the screenshot below, there is some space in between the volume textarea ("69%") and the separator ('//'). This is were the progressbar is (supposed to be).
My rc.lua (volume widget starts at line 140) has some buttons attached to the 2 volume widgets (the textarea and the progressbar). Those work fine, since when I use them while my mouse is over the spot where the progressbar should be, they work.
This means the progressbar does get created and thus should be visible, yet it isn't. I've tried different foreground and background colors but it never worked. I also tried setting a gradient but that didn't make the progressbar visible either.
I also tried creating a progressbar using "volumebar = awful.widget.progressbar()" instead of "volumebar = widget({type="progressbar" ..." but then it doesn't even reserve space for the progressbar in the wibox.

What's causing this? I must be forgetting something very simple, but I've looked at other rc.lua's and i can't see a difference.

My awesome version:

awesome v3.4.5 (Close To You)
• Build: Jul  3 2010 21:00:01 for x86_64 by gcc version 4.5.0 (nobody@archlinux)
• D-Bus support: ✔

YQTC0.jpg

Last edited by Diod (2010-07-10 21:46:01)

Offline

#2 2010-07-11 00:16:38

JackH79
Member
From: Australia
Registered: 2009-06-18
Posts: 663
Website

Re: AwesomeWM progressbar widget issue

Here is a section from my old rc.lua when I still had a volume bar:

volbar = awful.widget.progressbar()
volbar:set_width(10)
volbar:set_height(18)
volbar:set_vertical(true)
volbar:set_background_color("#1a1918")
volbar:set_color("#ff6500")
volbar:set_gradient_colors({ "#1a1918", "#60801f", "#9acd32" })
vicious.enable_caching(vicious.widgets.volume)
vicious.register(volbar, vicious.widgets.volume, "$1", 2, "Master")
volbar.widget:buttons(
awful.util.table.join(
awful.button({ }, 1, function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.button({ }, 4, function () awful.util.spawn("amixer -q sset Master 2dB+", false) end),
awful.button({ }, 5, function () awful.util.spawn("amixer -q sset Master 2dB-", false) end)
)
)

So I think you should maybe try changing your "volume.width = 50" to "volumebar:set_width(50)", etc.
And you need to register your volumebar with vicious to get the input (ie.' "$1", 2, "Master"' etc.). At the moment, your volbar widget is empty with no input.

Offline

#3 2010-07-11 13:31:06

Diod
Member
Registered: 2010-02-06
Posts: 11

Re: AwesomeWM progressbar widget issue

Unfortunately that does not work, it doesn't show anything (it does not even make room for the progressbar as it did with my rc.lua).
I also had to change vicious.enable_caching to vicious.cache or awesome would fail to start, but I'm guessing that's just because of me using another awesome version.

Offline

#4 2010-07-11 15:18:21

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: AwesomeWM progressbar widget issue

Using the above volbar example, that utilizes the new, 3.4, widget API, line 355 of your rc.lua should be changed to: volbar.widget,

You are also using vicious in a weird way, in case of a battery widget wrong way... all of itcan be solved by actually reading vicious documentation, and visiting the awesome wiki.


You need to install an RTFM interface.

Offline

#5 2010-07-11 18:09:46

Diod
Member
Registered: 2010-02-06
Posts: 11

Re: AwesomeWM progressbar widget issue

Well, that fixed it, thanks!

Yeah, I was kinda wondering if there wasn't a better way to update the battery icon (and the mpd status icon), and I have actually read the vicious documentation, but I can't really find an example of how to do this in the docs.
Should I perhaps register the battery (and mpd) icon with vicious separately and update it that way?

Offline

#6 2010-07-11 18:24:13

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: AwesomeWM progressbar widget issue

Sorry, I read the code more closer this time, and you did good with the battery... first time around it seemed like you are gathering your own data, and in that case the function should be shifted by one argument to the left - to register it as the actual widget, omitting vicious bat all together.

Last edited by anrxc (2010-07-11 18:25:08)


You need to install an RTFM interface.

Offline

#7 2010-07-11 19:04:15

Diod
Member
Registered: 2010-02-06
Posts: 11

Re: AwesomeWM progressbar widget issue

Oh, ok, great smile
Thanks for the help guys.

Offline

Board footer

Powered by FluxBB