Commit Graph

454 Commits

Author SHA1 Message Date
Julien Danjou be108acc32 [util] warn() and eprint() now print \n
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 22:56:05 +02:00
Julien Danjou db5430420d [client] Create luaA_client_userdata_new() function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 22:56:03 +02:00
Julien Danjou ed44254aeb [widget] Merge common functions.
Not really common after all.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 15:12:01 +02:00
Julien Danjou a04417494b [mouse] Rename Button to button_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 15:12:01 +02:00
Julien Danjou fb822997b3 [client] Remove ismax attribute.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 13:11:47 +02:00
Julien Danjou 65cdf2d536 [taglist] Count tag references
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-22 08:46:14 +02:00
Julien Danjou e25434fe25 [client/tasklist] Reactivate icon drawing with client.icon_set()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 22:37:08 +02:00
Julien Danjou dc431ec430 [scratch] Remove scratch client support.
This can be done in Lua now.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 19:47:29 +02:00
Julien Danjou 1f046b3c9f [everything] Switch from libconfuse to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 18:01:15 +02:00
Julien Danjou e80e6a73c5 [draw] Remove useless default_screen
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-13 17:42:05 +02:00
Julien Danjou 255d91c711 [statusbar] Separate widget cache inside widets and sbars
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-13 16:48:33 +02:00
Arnaud Fontaine bd0e92ef1d [iconbox] Get rid of GCC warning 2008-05-12 19:36:28 +01:00
Julien Danjou fb1ab46eea [iconbox] Use a_strtobool()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-11 16:20:58 +02:00
Julien Danjou ed7865c37b [graph] Cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou effaa99b91 [awesome] Remove useless includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou dc27cff8ab [awesome] Remove checking for value before p_delete()'ing memory
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou a3a47d718e [widgets] Cosmetic, and allow more bindings in tasklist
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou b142264787 [draw] Make draw_text using a const pointer to a style
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou f0e29977d8 [client] introduce client_style_get() and use it in tasklist/titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou 046c54a118 [taglist] Fix memory leak in parsing and escape title
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou c9f8d4e859 [taglist] Honors style; use pointers instead of hard copies
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 33837d77a1 [draw] Rename DrawCtx to draw_context_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 4d64efe64e [tasklist] Rename showclient_t type correctly
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou f12f1798dd [draw] Add margin code inside markup string
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 1fc2b7997a [taglist] Stop using styles, use markup string
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 0bbbfb5c67 [taglist] Prefix tag function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou 5c51759cca [draw] Make text_align part of markup format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:05 +02:00
Julien Danjou eab7633675 [tasklist] Remove styles; use drawtext format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 26621fd598 [emptybox] Remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 3965c1e1f0 [textbox] Clean things which became useless with markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 02c31eae05 [textbox] Remove bg property in widget_tell
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou 1185d8b156 [draw] Add support for bg in draw_text and use ellipsize from pango
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
marco candrian 8fa33698d2 replace 'command' with 'new_value'
Describes it somebit better

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou ce8d1ff89e [titlebar] Add string to format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou e4d091ab2e [tag] Rename Tag type to tag_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou d1635db59f [client] Rename Client type to client_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou a73b07f5d3 [statusbar] Rename Statusbar type to statusbar_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou 0cd46ab6b1 [widgets] Rename Widget type to widget_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou bd18eb2018 [util] Change Position type to position_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou df7db5e86b [util] Change Alignment type to alignment_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou c9f4c45007 [rules] Rename Rule to rule_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Arnaud Fontaine dafafd077c Port Awesome to XCB 2008-05-03 12:00:59 +02:00
marco candrian ce17b1457e [widgets] allow NULL for 'command' (FS#175)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-23 08:49:31 +02:00
marco candrian 7cad52aa01 [progressbar] Fix X computation
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-20 09:25:13 +02:00
marco candrian cbef649a2d [graph] fix: use own vertical_gradient config for each data{}
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-18 09:12:08 +02:00
marco candrian 2eb6fda36e [graph] simplify 'line' drawing; draw the border after the graph-drawing
Drawing the border after the graph-drawing, allows to draw down to the border itself
when 0 values occur.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-18 09:12:02 +02:00
marco candrian 9ba6cfd6c5 [progressbar] using the new draw_rectangle function with outer-coordinates
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-18 09:11:48 +02:00
marco candrian 66d24bb191 [progressbar] fix vertical-reversed bar + cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-17 09:50:00 +02:00
marco candrian 3f1c8a9479 [progressbar] about cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-17 09:49:49 +02:00
marco candrian 96fe2ec6fd [widgets/graph] when grow=right, fg_end in on the left of the rectangle (FS#163) 2008-04-14 04:23:57 +02:00
marco candrian bc7d9211ba [widgets/graph] offset fixed now.
In fact on my pc, when there is no fg_end or fg_center defined,
it draws it one pixel too much on the right.

On Gigamo's PC, that patch should work on any case.

It also 'should' work from what I guess!

For people having a problem, they could define fg_end to the same as fg.

Or when it's really serious (on not just here), that could be done inside
awesome.

(Finally somekind of little cairo bug, from my perspektive)
2008-04-14 04:21:52 +02:00
marco candrian 62ac090368 [common/draw] curious (cairo?) bug, sometimes draws the line 1 pixel to much on the right
happens only when creating a gradient, and not always, and
adding + 1 (creating a slightly diagonal gradient), seems to help a little bit).
2008-04-12 06:56:14 +00:00
marco candrian 4e15b4fab4 [widgets/progressbar] calculate/return 'real' width (instead of d->width) when ticks are used 2008-04-12 04:49:15 +00:00
Julien Danjou 7124b8887c [tasklist] Fix focused client handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-07 20:34:42 +02:00
marco candrian 4a7ebc9c5c [widgets/progressbar] fix FS#145 - empty progressbar draws one pixel too far
+ check_settings should be below the check for data_items (count).
+ some fix on check_settings
2008-04-02 15:51:30 +02:00
Julien Danjou c582f4397b [widgets] Check for no value in uicb_widget_tell and only update sbar on no error
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-02 15:31:19 +02:00
Julien Danjou a79cb3f927 [config] Add a bunch of new checks in configuration file
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-02 09:17:25 +02:00
Julien Danjou c43054bc4d [progressbar] check_settings should be static
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-02 08:46:32 +02:00
marco candrian ed231336fb [widgets/progressbar] try to prevent the bug FS#141
The real cause for it is unknown to me. I personally can't reproduce it.

Even when it won't fix, that patch makes still sense so:
no drawing of a rectangle what will get 'overdrawn' fully anyway.
2008-04-02 06:26:17 +02:00
marco candrian 30de23d8c7 [widgets/progressbar] fix x-offset value (pb_x actually) 2008-04-02 06:26:17 +02:00
Julien Danjou c4eaec5b82 [emptybox] Add alignment option
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-04-01 08:20:59 +02:00
Julien Danjou 3fbf7bd7d1 [emptybox] Remove align
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-31 15:58:33 +02:00
Julien Danjou 6c6d86eef1 [widgets/graph] Fix regression in padding removal (FS#139)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-31 14:31:58 +02:00
Julien Danjou 2fd0b3c008 [widgets] New emptybox widget
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-31 10:15:38 +02:00
Julien Danjou c4cc8c5e04 [widgets] Remove paddings
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-31 10:04:03 +02:00
marco candrian 0e1dbe40d2 [widgets/progressbar.c] x_offset+1 and bg color fix
the widget got drawn 1 pixel to much on the left.
adding one progressbar x offset (pb_x) seems to work nicely.

also. bg shall draw (according to the manpage), the gaps
between the 'ticks' + the padding between the border and the ticks
(... everthing inside the border only the ticks)

so, an additional rectangle draw line to achieve that basic bg color.
2008-03-28 09:53:50 +01:00
Julien Danjou 3ea69238ae [widgets/progressbar] Initialize unit value to 0
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-26 10:59:06 +01:00
marco candrian 89f4e22255 [widgets] new progressbar options
if a ticks_count is defined (!= 0), round the value to them ('ticks')
and draw finally some gaps.

Also an important issue: since the bar needs to be 'homogenous', they may won't
match a given height. Some value tweaking will be necessary then.

An alternative would be a not homogenous bar, what is worse I think.

The values, when there are 'ticks', get rounded up somebit. So they get turned on,
when half of them is reached - or so.

new options (see awesomerc.5.txt for a more detailed description):

border_width
border_padding
fg_off

ticks_count
ticks_gap

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-26 10:02:37 +01:00
marco candrian b92a292e43 additional line width argument to draw_rectangle[_gradient] in draw.c
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou 1d468c5583 Lot of cosmetic changes: proto change, etc.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou 0a6c6e017b Store physical screen id in statusbar and client, change get_phys_s() to screen_virttophys()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou 8d0e5b29a6 Cosmetic formating changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou a3f9eb7af9 Revert "Add preliminary support for XPM format"
This reverts commit 5f8b538a5e4eeea159b26c3d0b943cac745ffdce.
2008-03-23 15:52:22 +01:00
Julien Danjou df2555d9fe Add preliminary support for XPM format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:22 +01:00
Julien Danjou 2a47aa7f0b Add cfg_getalignment() functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:21 +01:00
Julien Danjou 7b1ce042de Add cfg_getposition() and cie to ease libconfuse compatibility
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:21 +01:00
Julien Danjou 19656fc36d Add a CFG_ALIGNMENT type and use it
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:21 +01:00
Julien Danjou fe8bd0bb5b Implement a CFG_POSITION type and use it 2008-03-23 15:52:21 +01:00
marco candrian 214a5c4bfa new graph-widget option: grow = <{right, left}>
Signed-off-by: Marco Candrian <mac@calmar.ws>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:21 +01:00
Julien Danjou a47e3d26d5 Add support for urgent style in tasklist 2008-03-23 15:52:21 +01:00
Arnaud Fontaine 542a944361 Use Pango for fonts instead of Xft (which hasn't been ported yet to
XCB) to measure text.
2008-03-23 15:52:21 +01:00
Julien Danjou 403d7e89f9 Compute style when we need to. 2008-03-23 15:52:20 +01:00
marco candrian 29673467f9 change graph's style to draw_style
to prevent confusion with the other style {} sections,
and it might also better describes what is it used for..
2008-03-23 15:52:20 +01:00
Julien Danjou ece6ffb8fe Fix background color for icons in tasklist 2008-03-23 15:52:19 +01:00
Julien Danjou c6eec955c8 Rename Area to area_t 2008-03-23 15:52:18 +01:00
Julien Danjou a2082ffbae Factorize some code with taglist_style_get() 2008-03-23 15:52:18 +01:00
Julien Danjou fa47024714 Change colors infrastructure to style: rename colors_ctx_t to style_t and add font in it 2008-03-23 15:52:18 +01:00
Julien Danjou 9dfd488dda Change colors handling 2008-03-23 15:52:18 +01:00
marco candrian 2e6dccc5ac make sure command is some text != ""
else call with command arg = NULL

No need to check for a_strlen(command) then on _tell anymore if command != NULL
2008-03-23 15:52:18 +01:00
marco candrian d1e216936c try to calculated the height etc in the same way on progressbar and graph
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.
2008-03-23 15:52:18 +01:00
marco candrian b1b2b48a4c graph: different widget index's (FIXME) handled now
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.
2008-03-23 15:52:18 +01:00
marco candrian 2e935ae1f6 vertical_gradient option for the graph widget
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
2008-03-23 15:52:17 +01:00
Julien Danjou 0a980095b3 Rework colors stuff, add a common colors_ctx_t containing colors and shadow options 2008-03-23 15:52:17 +01:00
Julien Danjou 5f26ab448c Free the previously opened font if changing it via widget_tell in textbox 2008-03-23 15:52:17 +01:00
Julien Danjou f3652aaca6 Add a pointer to SLIST struct to store previous element
This will make back cycling faster
2008-03-23 15:52:17 +01:00
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
Julien Danjou 6fc766a847 clean some tag stuff 2008-01-21 16:31:14 +01:00
Julien Danjou 45ac9d24f4 rename tag_view to tag_view_byindex 2008-01-21 16:31:14 +01:00
Julien Danjou 17a8c4a4c4 draw_text takes a Area as arg 2008-01-21 16:31:14 +01:00
Julien Danjou d59fc62739 draw rectangle take an Area as arg 2008-01-21 16:31:14 +01:00
Julien Danjou 654fba9b5e insert and use rule_matching_client() 2008-01-21 16:31:14 +01:00
marco candrian b8ff99f652 graph-widgets works with floats now
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-21 16:31:13 +01:00
Julien Danjou 7b5b02416a fix a bug in the tasklist loop that made clicking on tasklist focusing a wrong client 2008-01-18 09:49:04 +01:00
Julien Danjou b3f1b213a6 don't draw if icon is not valid 2008-01-17 13:45:24 +01:00
Nikos Ntarmos cedfecc68d Simplify textbox_tell
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-15 17:18:07 +01:00
Julien Danjou 903555e502 better fix for max windows 2008-01-11 17:56:50 +01:00
Julien Danjou 3ed6ac2bdf fix flags assignment 2008-01-11 16:01:10 +01:00
Julien Danjou ce0b433aba check if client is not NULL
Debian bug #459992
2008-01-10 07:05:54 +01:00
marco candrian 4f05f954d0 direct calculating of the line length to draw
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)
2008-01-09 10:10:29 +01:00
Julien Danjou bbc94b97f8 fix some cache flags 2008-01-09 09:59:45 +01:00
Nikos Ntarmos 95e348ab31 Don't draw a square on the taglist for skipped windows
I tend to prefer to not see a square on the taglist for tags which only
have skipped windows. E.g., if I run 'stalonetray --sticky
-w/--skip-taskbar', in which case it appears on all tags but not on the
tasklist, showing all of the tags as occupied seems somewhat awkward.
2008-01-09 09:11:23 +01:00
Julien Danjou 5c9291ff0b use a cache system for status bar 2008-01-07 18:12:38 +01:00
Julien Danjou a41c25c0f5 modify the tell function to respect spaces 2008-01-07 15:48:42 +01:00
Rico Schiekel 079569e6b4 tell textbox widget colors
usage is simple:
,----
| echo "<screen> widget_tell <mytextbox> #[fg_color] #[bg_color] <text>" | awesome-client
| e.g.
| echo "0 widget_tell t normal behaviour" | awesome-client
| echo "0 widget_tell t #ff0000 red text on default background" | awesome-client
| echo "0 widget_tell t #ffffff #ff0000 white text on red background" | awesome-client
| ...
`----
the fg and bg colors are optional. if not given, the last state is
used.
2008-01-07 15:21:50 +01:00
Julien Danjou 8877aae6c9 add show_all option to tasklist 2008-01-07 11:20:24 +01:00
Nikos Ntarmos 32163d80e1 Clipping instead of ignoring for progressbar widget
FS#25
2008-01-07 09:29:11 +01:00
Nikos Ntarmos 348440bc8e autoscale graph widget
FS#26
2008-01-07 09:28:07 +01:00
marco candrian 40dc6eab21 rounding on progressbar fixed 2008-01-07 09:24:21 +01:00
Julien Danjou 9fa01e34de rename textwidth to draw_textwidth 2008-01-06 22:57:23 +01:00
marco candrian 37da7d0d01 graph widget added
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.
2008-01-06 20:51:40 +01:00
Julien Danjou b1c62a618f store widget height 2008-01-05 12:44:14 +01:00
Julien Danjou 609318cbec use 2 vars for knowing if users supplied coords 2008-01-05 12:35:12 +01:00
Julien Danjou a34d1bc583 fix comparisons 2008-01-05 12:01:09 +01:00
Nikos Ntarmos 64658bcf93 widgets/textbox.c area.x miscalculation due to variable width 2008-01-05 09:12:20 +01:00
Hans Ulrich Niedermann 2476faf85d Include sub-Makefiles directly, then remove them 2008-01-04 22:14:53 +01:00
Julien Danjou a4c09d142c add support for x,y coords supplying in widgets 2008-01-04 22:05:52 +01:00
Julien Danjou 6ca7d7b2db use Area in Widget 2008-01-04 21:46:25 +01:00
Hans Ulrich Niedermann ec09073087 switch to autotools as build system 2008-01-04 20:49:49 +01:00
Julien Danjou 1d6613349e typedef enum Alignment 2008-01-04 19:17:20 +01:00
Julien Danjou af6ff367eb typedef enum Position 2008-01-04 19:12:07 +01:00
Julien Danjou 36e9e07f84 fix memory leak on icon get 2008-01-04 15:59:17 +01:00
Julien Danjou 8485c13b1b taglist now supports clicks if statusbar is right/left 2008-01-04 13:22:24 +01:00
Julien Danjou 65fe4e8933 add support for right/left statusbar position and clicks 2008-01-04 13:04:34 +01:00
Julien Danjou a69b5dfc40 add option to show appicons in tasklist 2008-01-03 19:21:36 +01:00
Julien Danjou 33cd7c261f set widget->width to the right size(TM) 2008-01-03 19:06:44 +01:00
Julien Danjou 62d5711a7e move NetWMIcon get to ewmh.c 2008-01-03 19:02:23 +01:00
Julien Danjou 675b6e6255 use right statusbar in various widgets 2008-01-03 17:15:21 +01:00
Julien Danjou a06d739dfb add align option to tasklist 2008-01-03 16:05:39 +01:00
Julien Danjou 7c716e0ec0 add align option to focustitle 2008-01-03 16:04:16 +01:00
Julien Danjou ec53f3d070 add align option to textbox 2008-01-03 16:02:41 +01:00
Julien Danjou aed3e569de add a align option to draw_text 2008-01-03 15:57:07 +01:00
Julien Danjou 53a36375fa remove useless #include 2008-01-03 14:38:12 +01:00
Julien Danjou 11da7412b3 add support for _NET_WM_STATE_SKIP_TASKBAR 2008-01-03 13:15:15 +01:00
Julien Danjou 67127f00f7 simply add draw_rectangle instead of drawtext 2008-01-03 12:43:37 +01:00
Julien Danjou c4e88f9928 add new tasklist widget 2008-01-03 12:39:28 +01:00
Julien Danjou 9fc22e9e4e remove some get_phys_screen() calls 2008-01-02 17:41:03 +01:00
Julien Danjou 437bc5c22c add 2008 copyright notice 2008-01-02 16:59:43 +01:00
Julien Danjou 2f19bab193 simplify update 2008-01-02 15:01:30 +01:00
Julien Danjou 1b48166ad5 add resize option to iconbox 2008-01-02 14:59:15 +01:00
Julien Danjou 4f65aa8f51 rework headers inclusion 2008-01-01 18:02:36 +01:00
calmar b832f96ba1 fix border color 2008-01-01 17:04:06 +01:00
Julien Danjou c4b4a1fded change warn() message and use simply , as strtok delimiter 2008-01-01 16:29:59 +01:00
Julien Danjou bb06e80199 simplify some stuff, cosmetic 2008-01-01 16:29:58 +01:00
marco candrian 0945e3ad34 additonal settings for the progressbar 2008-01-01 16:29:53 +01:00
Julien Danjou 13e5b96807 don't stick textbox size to the first textsize sent via widget_tell 2007-12-30 21:03:22 +01:00
Julien Danjou 75c7d04adf allow textbox to have special width 2007-12-30 14:49:03 +01:00
Julien Danjou 0eb4743385 draw_text don't pad with font->height / 2 by default: padding is now an arg 2007-12-30 14:42:51 +01:00
Julien Danjou e57f387df0 fix size stuff for square 2007-12-30 14:06:45 +01:00
Julien Danjou f7263bbca8 bug fix: reset widget->width to 0 2007-12-30 13:42:49 +01:00
Julien Danjou 1021f86e24 rework draw stuff
- remove display from DrawCtx
- add Drawable in statusbar
2007-12-30 12:26:11 +01:00
Julien Danjou 34ddf418ad fix colors handling 2007-12-29 22:01:11 +01:00
Julien Danjou 3d71a2e9a4 merge draw_get_image_{width,height}() into draw_get_image_size() 2007-12-29 21:44:44 +01:00
Julien Danjou 11a4ecc32a optimize loop 2007-12-29 21:37:04 +01:00
Robert Millar eb65306127 Custom netwm icons, scaling icons!
I hacked together support for custom netwm icons set in the rules
section of .awesomerc, and for iconboxes and netwm icons to be scaled
to fit into the statusbar. It could probably be done a bit more
cleanly than I've done it, though :)

Rob
2007-12-29 21:30:37 +01:00
Julien Danjou bf5d5fa17e add support for fg/bg colors and dedicated font for focustitle widget 2007-12-29 19:39:46 +01:00
Julien Danjou 360d9023a4 allow textbox widgets to have their own font 2007-12-29 16:04:06 +01:00
Julien Danjou 48d9ea047f simplify is_client_tagged() proto 2007-12-27 23:05:34 +01:00
Julien Danjou 38c3547dfb fix warning 2007-12-27 20:35:53 +01:00
Julien Danjou 5f92667773 simplify sel handling 2007-12-27 19:57:46 +01:00
Julien Danjou 8f9be2289a focus_get_latest_client_for_tags() now supports Tag **, use it for widgets 2007-12-27 19:23:10 +01:00
Julien Danjou e335b32e5f add copyright notice 2007-12-27 18:11:47 +01:00
Julien Danjou c900e37843 add mouse bindings to status bar 2007-12-27 15:49:00 +01:00
Julien Danjou 88b3f28f49 remove get_current_tag() call 2007-12-27 11:36:49 +01:00
Julien Danjou 33add50256 store location and width of each widgets 2007-12-27 11:35:45 +01:00
Julien Danjou 7be6a97972 change "default" in textbox to "text" and set it to a good default 2007-12-27 00:16:29 +01:00
Julien Danjou 91cc5a4618 use image instead of symbols for layouts 2007-12-27 00:13:44 +01:00
Julien Danjou d5d9439777 add support for Urgency hint 2007-12-23 15:16:10 +01:00
Julien Danjou 2906ead93c better computing for margin 2007-12-23 14:51:55 +01:00
Julien Danjou ddbdbb2ed3 new width: progressbar 2007-12-23 14:27:56 +01:00
Julien Danjou d428982af7 simplify 2007-12-23 13:46:36 +01:00
Julien Danjou 10200477c8 change info in copyright 2007-12-22 20:55:39 +01:00
Julien Danjou b0a8522466 rename a bunch of widget functions 2007-12-22 20:55:17 +01:00
Julien Danjou c232576631 rename a bunch of draw functions 2007-12-22 20:17:24 +01:00
Julien Danjou e72a278080 allow to shrink net_wm_icon to statusbar size 2007-12-22 20:14:13 +01:00
Julien Danjou 8c898256b1 new widget: add support for netwmicon 2007-12-22 19:32:47 +01:00
Julien Danjou 5dfd96a3f2 add copyright 2007-12-22 15:43:48 +01:00
Julien Danjou 1a1c75b4bd add copyright 2007-12-22 15:42:34 +01:00
Julien Danjou e505b76062 cosmetic + copyright 2007-12-22 15:41:28 +01:00
Julien Danjou 70707a37ad push iconbox.c 2007-12-22 15:38:14 +01:00
Julien Danjou 55be368539 cosmetic 2007-12-22 15:30:23 +01:00
Aldo Cortesi 7190e4fa48 Change awesome_config -> AwesomeConf.
All other struct definitions in the project follow this naming convention.
2007-12-19 10:43:02 +01:00
Aldo Cortesi 9bb28772ed Make textbox foreground and background configurable. 2007-12-19 10:41:50 +01:00
Aldo Cortesi ce556ec743 The preferred line length is 80 characters. 2007-12-18 11:27:26 +01:00
Aldo Cortesi 205f2c55ca Make "Statusbar statusbar" the in VirtScreen "Statusbar *statusbar". This is
more consistent with the rest of the interface, and will make our life easier
when we have mulitiple statusbars per screen.
2007-12-18 11:26:18 +01:00
Aldo Cortesi 21fe1add9e Make drawtext interface more general. 2007-12-18 11:25:50 +01:00
Aldo Cortesi 4723ab3627 This patch is a first draft of independently targetable textboxes, and a
protocol to speak to them. Given a textbox widget definition like this:

        textbox mail {
            default = 0
        }
        textbox time {}

We can update the boxes individually by going:

    echo 0 tell_widget mail 10
    echo 0 tell_widget time 12:01

Text boxes will dynamically resize to fit their contents. A textbox can be
cleared by going:

    echo 0 tell_widget name

A text-box containing no text will take up 0 space in the bar, i.e. it will not
be visible at all

Textboxes now supersede statusbar_set_text, so this call has been removed.
2007-12-17 18:22:05 +01:00
Aldo Cortesi d5fd96dbd2 Refactor the focus.c interface to use globalconf. 2007-12-17 18:21:42 +01:00
Julien Danjou 077ffb5b43 update titleinfo with the right window 2007-12-16 18:23:37 +01:00
Aldo Cortesi 5715b70ab3 Make empty status bar look nice.
It's now possible to have unfilled space on the status bar. Fill it with the
background colour on creation.

Normalise line lengths while I'm at it.
2007-12-16 12:58:21 +01:00
Aldo Cortesi 5923c90aaa Solidify widgets.
Factor out common initialisation into a common_new function. Copy the section
title into the Widget title attribute.
2007-12-16 12:57:47 +01:00
Aldo Cortesi 8880a3804e Simplify widget draw interface. 2007-12-16 12:54:42 +01:00