Commit Graph

175 Commits

Author SHA1 Message Date
Uli Schlachter 241d582c55 gears.object: Give better error messages
It helps a lot to know which signal does not exist. That should make it a lot
easier to look for the "guily" code without having to resort to the backtrace.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 16:58:54 +02:00
Alexander Yakushev ec66ac876b Fix debug.dump
dump_return is no longer local, so debug prefix must be provided

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-08-31 15:23:56 +02:00
Uli Schlachter 615aff3369 gears.wallpaper: Import
This is a lua module for managing the wallpaper.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-29 16:39:03 +02:00
Uli Schlachter 4b049c310d gears.surface: Update required lgi version
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-22 23:22:58 +02:00
Arvydas Sidorenko 65de8a7ab5 Broken lgi version checking
Currently it takes `require('lgi.version')`, converts it blindly to
number and compares with another value.
I am using lgi v0.6.1 and that is not convertable to number value,
thus tonumber() returns nil and crashes Awesome.
The fix is to take major and minor numbers only ignoring the rest.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-22 23:21:14 +02:00
Arvydas Sidorenko 997de2726c Ported lib/gears to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko e789cfaf66 Ported lib/gears to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 9623b8e42f Changed unpack in portable way
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 13:00:13 +02:00
Uli Schlachter ca2fc7811a gears.surface: Add a version check for lgi
The cairo bindings are quite new in lgi and thus we depend on a quite new
version of lgi. Older versions will fail with lots of weird errors, e.g.:

lib/gears/color.lua:61:attempt to call field 'create_rgba' (a nil value)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-05 16:22:04 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Alexander Yakushev 394bacacea gears.debug: Print plain non-table values in dump_raw
dump_raw function wasn't printing the plain (non-table) value if the
tag was not specified.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-20 22:40:31 +02:00
Alexander Yakushev 067e91e5a8 gears.debug: Add functions for inspecting tables
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-26 16:34:03 +02:00
Anurag Priyam 69a96fc505 gears.color: call the correct creator function in local string_pattern function
The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-29 20:58:01 +01:00
Uli Schlachter 2216b6a341 gears.color: Add table-based color definitions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:48:11 +01:00
Arvydas Sidorenko e052bd99b0 oocairo.image_surface_create_from_png TO awesome.load_image
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>
2012-01-29 16:18:18 +01:00
Anurag Priyam 54a9ecbd27 gears.color docs: replace literal '<' and '>' with respective HTML entities
Luadoc confuses '<stop>' with an HTML tag otherwise.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam d3e8dfed2b gears.colors() docs: fix pattern string used in the example
In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used.  The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern.  So we modify the example to use the correct type -- 'radial'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam 765db33757 gears.color: expose documentation for create_(linear|radial)_pattern functions
The documentation for these functions were hidden (intentionally?) from luadoc
because of misspelt @class and @name tags. Fixed the spelling, so luadoc can do
its job.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
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>
2011-09-11 17:34:09 +02:00
Uli Schlachter 1f95825a1e gears.debug: Import
So far this only contains an "assert()" function, but I guess this could be
enhance. For example, a function which pretty-prints a table's contents might be
useful to have.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-22 14:49:12 +02:00
Uli Schlachter ad3e965e16 Fix some broken luadoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 21:38:06 +02:00
Uli Schlachter d74198b7db gears.color: Add much more sophiscated stuff
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 18:54:20 +02:00
Uli Schlachter c3e0f72c56 gears.object: Import
This implements objects in lua. Objects provide the signal functions that are
known from the C API ({dis,}connect_signal(), emit_signal(), add_signal()).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-28 16:23:00 +02:00
Uli Schlachter b75ada22d8 gears.sort: Import
The difference to table.sort() is that this is guranteed to be stable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-28 16:09:40 +02:00
Uli Schlachter 9a24779425 Implement color parsing
This adds a lua module for parsing colors. Named colors like "black" aren't
supported, but #rrggbb and #rrggbbaa colors do work.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-09 16:54:57 +02:00