On Mon, Jan 14, 2013 at 11:58 PM, Stefan Hellmann <[email protected]>wrote:
>
>> On 01/12/2013 11:52 PM, Vitor Eiji Justus Sakaguti wrote:
>> > Argh, forgot to CC the list.
>> > Damn gmail app...
>> > On Jan 12, 2013 8:47 PM, "Vitor Eiji Justus Sakaguti"
>> <[email protected]>
>> > wrote:
>> >
>> >>
>> >> On Jan 12, 2013 7:18 PM, "Adrian C." <[email protected]> wrote:
>> >>>
>> >>> On Sun, 6 Jan 2013, g.schlmm wrote:
>> >>>
>> >>>>>> im doing it like this:
>> >>>>>> gradient = "linear:0,0:20,20:0," .. beautiful.fg_end_widget ..
>> >> ":0.5," ..
>> >>>>>> beautiful.fg_center_widget .. ":1," .. beautiful.fg_widget
>> >>>>>>
>> >>>>>> vol:set_color(progress_gradient)
>> >>>
>> >>> Hi isn't 'progress_gradient' an undefined variable? Or what is it?
>> >>
>> >> Yes, it is. I corrected it in my rc.lua for it to work and thought it
>> was
>> >> too trivial to mention, even for the sake of googlers.
>> >> But you seem to disagree. You're very kind :)
>> >>
>> >> Thanks again
>> >>
>>
>> Wow, that looks good. Anyone has a solution for the old
>> set_gradient_angle "parameter"?
>>
>> For example:
>>
>> gradient = "linear:0,0:20,20:0," .. beautiful.fg_end_widget .. ":0.5,"
>> .. beautiful.fg_center_widget .. ":1," .. beautiful.fg_widget "
>> cpuw:set_color(gradient)
>> cpuw:set_gradient_angle(0)
>>
>>
>> --
>> To unsubscribe, send mail to [email protected].
>>
>
As i see from the documentation you can't specify an angle any more. But
you can do the following:
local cpu_widget_gradient_color = {type = "linear", from = {0, 0}, to =
{20, 20}, stops = {{1, "#00FF00FF"}, {0, "#FF0000FF"}}}
cpuwidget:set_color(cpu_widget_gradient_color)
from is x1, y1 and to is x2, y2. You can specify your own coordinates to
create an angled gradient. I haven't checked it myself but that seems to
work.
You may also want to look at this
http://awesome.naquadah.org/doc/api/modules/gears.color.html
--
Regards,
Roman