some issue is still there (anyway). When there are e.g. 5 horizontal bars
the width of that progressbar (multiply of 5 or similar) may won't be the
same like a graph.
So some tweaking on the graphs' height is necessary then.
widget_tell can feed data to some with another frequenzy.
When drawing a line, it has to be searched for a smaller value, what should
not get overdrawed. In order to find such a smaller value, the correct value
has to be compared to - and therefore the correct index.
if true, the color values (fg, fg_center, fg_end) create a color gradient
from 0 to full value, instead of new values to old values.
each data{} can have it's own setting
actually the _tell function won't handle the new argument.
Coming patches will handle them.
it will need now something like this:
echo '0 widget_tell widget property value'
where property can be anything used in the awesomerc file,
that means what will be supported. Like: fg, fg_end, width, font...
(actually it ignores the property value and changes what have been changed in
the past as well.)
A hint from maxauthority. The names would be unified now in the progressbar
and the graph widget. And (hopefully) it's easier to guess what they mean now.
Signed-off-by: Julien Danjou <julien@danjou.info>
Draws a color-gradient beginning from fg and
if either fg_middle or fg_end is set, through them.
example config:
graph gr_cpu
{
data { scale = false max = 100 style = bottom
fg = "#cc6666" fg_half = "#cc6666" fg_full = "#998888"}
...
...
}
Signed-off-by: Julien Danjou <julien@danjou.info>
There are the new styles:
bottom (fill the graph to the bottom of widget-square)
top (fill the graph to the top of the widget-square
line (just print a line representing the values)
E.g when there are multiple 'bottom'-style graphs, it will print the larger
part on top of the smaller. When two values are the same, it will (actually)
just print it with one color (something to improve maybe).
bottom-style overdraws top-style, and line-style overdraws top and bottom style
(= gets drawn at the end)
An example configuration:
graph gr_cpu
{
data { scale = false max = 100 fg = "#669966" style = bottom} # total
data { scale = false max = 100 fg = "#cc9966" style = bottom} # user
data { scale = false max = 100 fg = "#ffffff" style = bottom} # nice-processes
width = 50
height = "0.80"
bg = "#000000"
bordercolor = "#669966"
}
With the 'line' style, there is a bug (draws sometimes over the rectangle).
I checked the values and didn't find any value what actually should do that.
So I have no idea why that is... needs a recheck, because it's not really nice..
Happens especially when scale=true and after a rescaling takes place.
Signed-off-by: Julien Danjou <julien@danjou.info>
the graph_tell() does not modify directly the line-lenght to draw, rather
then calculating the value in percent and in the graph_draw, calculating
the line length ouf of that the percent.
(while trying to fix something little, a whole new scale thing resulted;
also I didn't really understand the old system, my fault that is)
example config:
graph gr_cpu {
width = 80
height = "0.8"
fg = "#336633"
bg = "#000000"
bordercolor = "#669966"
padding_left = 0
mouse = {...}
x = ...
y = ...
}
Looks like here: http://www.calmar.ws/tmp/112-Sun-screen.png
I renamed lpadding to padding_left, and bcolor to bordercolor
also on the progressbar widget.
The awesomerc page would still be to write, when this patch will get accepted.
Hints are always welcomed.