Replaced all references to image_surface_create_from_png to
awesome.load_image
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Symbols (or, visual hints) used to indicate that a client is: 'ontop' or
'floating' or 'maximized_horizontal' or 'maximized_vertical', can now be
defined in the theme, or passed to awful.widget.tasklist() as the last, 'style'
argument (see docs).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of re-creating all the widgets for the list entries on each update, this
code now caches its widgets again and only creates new widgets when a new
client/tag appears.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:
#!/bin/ksh
git ls-tree -r HEAD | cut -f2 | while read f; do
egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
mv /tmp/foo $f
done
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This handles corner case where a client has no tags (e.g. stickied), but
is moved across screens.
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
When some client sets an invalid window title, a lua error was generated while
updating the tasklist. This caused all later tasklist entries to be skipped /
missing and the last entry to be empty.
Fix this by catching lua errors with pcall.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a bug where the tasklist would still show its old content after a
client was minimized/unminized because it didn't connect to the appropriate
signal.
This wasn't noticed before, because in most cases minimizing a client also
unfocuses this client which causes a tasklist update.
Signed-off-by: Uli Schlachter <psychon@znc.in>
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Added function to show only minimized clients in the taskbar for the
current tag.
Signed-off-by: Danny Navarro <j@dannynavarro.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The icon should get the same background everything else gets. Fix this by making
the background the outer-most widget in each item.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We need a fixed layout here to make tag names like "media" work. Without this,
every take would get the same space, no matter how long its name is.
Signed-off-by: Uli Schlachter <psychon@znc.in>
They can and should now be done via gears.color instead. It was porting ever
since this was ported to oocairo anyway...
Signed-off-by: Uli Schlachter <psychon@znc.in>
It seems like with lots of bad luck, the garbage collector manages to "steal"
the table with the buttons right after we decided to use it. Evil collector!
Signed-off-by: Uli Schlachter <psychon@znc.in>
The data table is used to map objects (clients/tags) to the buttons associated
with them. This is done so that we don't have to re-create the button objects
each time this lists are updated.
The problem was that this weak-keyed table was never cleared, because the value
had a strong reference to the key (via the button's signal):
btn:connect_signal("press", function () b:emit_signal("press", o) end)
"o" is the key in the table and btn is reachable from the value. This prevented
the garbage collection of the key. Using a weak-keyed and weak-valued table
fixes this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since 3fbb5f1535 "luaobject: emit signals on class too" when a signal
is emitted on some object, it will also be emitted on the class. This means that
we don't have to connect our signals via the "new" signal anymore, but can
instead connect to the signal on the class.
(Of course, the signal on the class gets as first argument the object on which
the signal was emitted)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Ever since awesome.spawn() also returns the pid of the started process, the
prompt accidentally displayed the pid of processes that it started.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The tasklist shouldn't care about the tag history or new tags showing up and it
also shouldn't care about tags disappearing on other screens (on the current
screen the tasklist needs to update because the tag might have been selected).
On the other hand, the tasklist really should care about tags being selected and
unselected. This worked before because this causes changes to the focus history.
Signed-off-by: Uli Schlachter <psychon@znc.in>
"a .. b or c" is equivalent to "(a .. b) or c", but we want "a .. (b or c)".
This bug caused an "attempted to concatenate a nil value" error message.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
Initial implementation of stacked graphs. Adds two new methods,
set_stack (false by default) and set_stack_colors (i.e. {"red",
"white", "blue"}). The order of the colors matters, because the
add_value method now accepts an (optional) last argument, an index of
a color from your stack color group.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
Second implementation of the progressbar ticks. Adds set_ticks,
set_ticks_gap and set_ticks_size methods. Default gap is 1, size 4 in
respect to the default progressbar width of 100px.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
The awful.widget.graph allows to change the maximum value a graph can
handle, thus allows users to use widgets and scripts that don't scale
the values down to 0 - 1 range. The progressbars did not allow this
and worked with a hard-coded value of 1.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
awful.widget.graph and progressbar both create an imagebox. The default is
resize = true which means the image is scaled up inside the wibox if
:set_height() is used.
Setting widget.resize = false avoids this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
set_value() didn't call update() and thus had no visible effect on the
progressbar.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This code accesses these functions via _M['set_height'], but if these are local
functions they aren't available this way. Un-local-ing helps here.
This was noticed by anrxc when he set a widget's height to 0.9. These functions
should have caught this invalid height and ignore it, but because they weren't
actually used this error checking was bypassed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This change enables stuff like the following:
awful.widget.graph({}):set_color("red"):set_width(40):add_value(0.5)
Additionally, one can use the above directly in th widgets table.
This most likely doesn't break any existing configs and it adds a quite nice
syntax which can be used for in-place configuration of new widgets.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
First, we need to actually draw values which are zero, else the background
"shines through". Since this breaks the border (it draws over the border),
drawing the border needs to be done later.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
If this is set to true (default is false), then the graph widget automatically
scales its content to make it fit exactly. If "max_value" is also set, this is
the minimum "height" the graph will use.
This can be useful for graphes which monitor things like network bandwidth
which can vary a lot.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This allows setting 'hide' property for a tag to prevent it from
showing in the taglist.
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>