Closed r3lgar closed 8 years ago
Look like your prg
isn't a Cairo context, also, this function doesn't return anything, so your code looks wrong. You can take a look at the examples in the documentation or the unit tests (they are the same, the official documentation example are auto-generated using the unit tests)
http://new.awesomewm.org/apidoc/libraries/gears.shape.html https://github.com/awesomeWM/awesome/blob/master/tests/examples/gears/shape/radial_progress.lua
Here is my "radial_progressbar" widget code: https://gist.github.com/Elv13/2ef20b71f3a9a37020c1dcc25a7126a1
You can take a look at the examples in the documentation
I am.
Look like your prg isn't a Cairo context
I don't understand how it works. With wibox.container.background
it work. Is wibox.widget.progressbar
hasn't a Cairo context?
Can I manipulate percent
in another function?
Is wibox.widget.progressbar hasn't a Cairo context?
Widgets are not Cairo context, so this unfortunately wont really work (it would be cool if it did). For now, use the widget I added in the last link. As there seem to be interest in having this kind of visualization, I will brake my words and submit it to Awesome (I said I would not submit any new code until 3.6... Whatever, it cannot cause regressions and I use it since 2011, so it works fine by now). It will be a new container, extending the progressbar isn't really a good idea as they would share almost nothing beside the percent property.
Cairo (and lgi) is too complicated for me. I am interested, but I don't understand how it works. %)
Let's start by some doc https://github.com/awesomeWM/awesome/pull/959
Oh, thank you, guys.
Can this be closed? Somehow this started with some broken code and then turned into "let's write some docs" and now I'm confused.
Can this be closed?
I guess so. To "fix" this, I would need to upstream my widget that does exactly what @funeralismatic want (see the gist above). However the code isn't good enough for you and I don't want to spend time on this and/or push new code until 3.6 is released.
Better just use the gist above for now and wait for 3.7 "merge window" to open before trying to upstream it.
@funeralismatic I upstreamed the widget, see: http://new.awesomewm.org/apidoc/classes/wibox.container.radialprogressbar.html
Try to test
gears.shape.radial_progress()
stderr: