Commit graph

159 commits

Author SHA1 Message Date
marco candrian
04ff373a63 New progressbar option: vertical=<boolean>
if 'true', draws the whole progressbar-block vertically
instead of horizontally.
2008-03-23 15:52:16 +01:00
marco candrian
6216d25bc6 new progressbar option for reversing the drawing
inside a data section, with reverse=<boolean> it's possible to reverse the
drawing i.e instead of left to right, from right to left. etc.
2008-03-23 15:52:16 +01:00
marco candrian
397aa33163 widget error infrastructure additions 2008-03-23 15:52:16 +01:00
Julien Danjou
0e69534a65 Add a common error infratructure for widget_tell
Signed-off-by: Marco Candrian <mac@calmar.ws>
2008-03-23 15:52:16 +01:00
marco candrian
3efadded39 graph widget handles property arguments now
data section values:

echo '0 widget_tell progess data title new_value' ...

universal settings  are width, height, padding_left, bg, bordercolor like:

echo '0 widget_tell progess height value' ...
2008-03-23 15:52:16 +01:00
marco candrian
0c4dc79bb6 progressbar widget handles property arguments now
data section values:

echo '0 widget_tell progess data title new_value' ...

data properties: fg, bg, fg_center, fg_end, bordercolor works like this:

echo '0 widget_tell progess fg_end title new_color' ...

universal settings to tune are gap, width, height, padding:

echo '0 widget_tell progess padding value' ...
2008-03-23 15:52:16 +01:00
marco candrian
57e9cb468f textbox handles properties now
text, fg, bg, font, width and text_align actually
2008-03-23 15:52:16 +01:00
marco candrian
c384252bc6 iconbox handles the property arguments
image <image), resize <{true, false}> are supported actually
2008-03-23 15:52:16 +01:00
marco candrian
3569ab617d new property argument to widget _tell functions
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.)
2008-03-23 15:52:16 +01:00
Julien Danjou
4451e9099e Add support for text shadow, add new text_shadow_offset option. 2008-03-23 15:52:15 +01:00
Julien Danjou
86927a9e7e textbox can be flex-aligned 2008-02-28 16:19:38 +01:00
Julien Danjou
b7d79d8bea use physical screen 2008-02-26 07:15:24 +01:00
marco candrian
4ff0dae17e trailing whitespaces removed
like:
find . -iname "*.txt" -o -iname "*.c" -o -iname "*.h" | xargs sed -i 's/\s\+$//'

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-13 09:05:10 +01:00
marco candrian
070ec6dbcd little memory leak fix *shrug*
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-13 09:04:32 +01:00
Julien Danjou
ae75f55acd change draw_color_new() proto to fill the struct and return status 2008-02-13 08:58:21 +01:00
Julien Danjou
68affe21fd do not draw win that skip focus 2008-02-12 10:29:41 +01:00
Julien Danjou
95fc524993 set widget alignment for graph 2008-02-11 19:01:48 +01:00
Julien Danjou
72d68b13a3 change focus raising 2008-02-09 23:12:40 +01:00
Julien Danjou
0bfa880b0f add align option to widget to specify their alignment 2008-02-08 10:59:55 +01:00
Julien Danjou
91f80b251c rename align to text_align 2008-02-08 09:58:36 +01:00
Julien Danjou
170ed9882a rename netwmicon to focusicon 2008-02-06 20:13:41 +01:00
Julien Danjou
ffbcea0084 remove focustitle widget 2008-02-06 20:05:14 +01:00
Julien Danjou
528ff7316c tasklist can now show focused only client 2008-02-06 20:03:18 +01:00
Julien Danjou
b2e004b453 add scratch window support 2008-02-06 09:06:43 +01:00
marco candrian
8567009d22 rename of fg_middle/fg_half to fg_center and fg_full to fg_end
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>
2008-02-06 07:32:22 +01:00
Julien Danjou
0e890697ac fix uninit warning 2008-02-05 15:40:16 +01:00
marco candrian
ff753f1f14 Adds fg_middle + fg_end color option for the graph widget
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>
2008-02-05 15:37:21 +01:00
marco candrian
a28f931d08 awesomerc(1) update for progressbar widget option fg_half
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-05 12:04:03 +01:00
marco candrian
09e60cb95e adds fg_half as an option to the progressbar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-05 07:16:12 +01:00
marco candrian
b024b0c0cf draw_rectangle_gradient() for the progressbar widget; + fg_full option
Adds an optional additional foreground color option to a bar: fg_full = <color>

A value of 0 represents the fg-color, and a value of 100 (a full graph) the
fg_full-color.

Example:

progressbar xy
{
  bar { fg = "#111155" fg_full = "#3333cc"  bg = "#000000" bordercolor = "#4444cc"}
  ....
}

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-04 11:16:30 +01:00
marco candrian
be0779d0fa graph widget adopted to the latest statusbar changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-31 20:43:42 +01:00
Julien Danjou
42d4686282 change padding_left to padding for progressbar 2008-01-29 08:44:16 +01:00
Julien Danjou
d9298f6edb rename get_current_tags to tags_get_current() 2008-01-29 08:31:13 +01:00
Julien Danjou
ea57fd8fc9 add support for smart windows placement in floating layout 2008-01-28 18:30:23 +01:00
Julien Danjou
3d74f42446 tmp_color can be uninitialized 2008-01-27 19:10:15 +01:00
Julien Danjou
95d5fe299e rename focus() to client_focus() 2008-01-27 19:07:39 +01:00
Julien Danjou
b6642e45c8 rename initxcolor to draw_color_new() and move it to draw.c 2008-01-27 18:56:37 +01:00
Julien Danjou
c22430a115 fix handling of window raisings 2008-01-25 23:43:16 +01:00
marco candrian
c73e0bd72e Additional graph widget options
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>
2008-01-25 22:53:20 +01:00
Julien Danjou
3855ced402 remove selscreen arg 2008-01-24 23:48:35 +01:00
Julien Danjou
2ac27fdac4 move draw files to common/ 2008-01-24 18:48:11 +01:00
Julien Danjou
35803aff4c make draw functions more independant 2008-01-24 18:43:24 +01:00
Julien Danjou
e0a12f9e58 draw nothing is icon is invalid 2008-01-23 19:13:49 +01:00
Julien Danjou
f3aa1ede5c textbox width is limited to unused space 2008-01-23 08:28:02 +01:00
Julien Danjou
b27208d9d1 don't draw if we do not have space too 2008-01-22 17:52:12 +01:00
marco candrian
ec7ab36814 max values must be > 0 on the graph-widget
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-22 15:01:21 +01:00
Julien Danjou
668702b777 move list.h and util.[ch] to common/ 2008-01-21 18:14:59 +01:00
Julien Danjou
47a5eac10c don't leave unused pixels 2008-01-21 16:31:15 +01:00
Julien Danjou
9d4aaa5461 draw a background for icons in tasklist 2008-01-21 16:31:15 +01:00
Julien Danjou
9f28582820 add Display as arg 2008-01-21 16:31:14 +01:00