Commit Graph

179 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 790d2aa6ee doc: Add a missing test example macro
I found this while doing a review in case the intentation changes
broke other tests.
2017-01-03 00:07:57 -05:00
Daniel Hahler 4b9e8e232d Merge pull request #1341 from psychon/modeline
Lots of fun with vim modelines
2017-01-02 19:56:06 +01:00
Uli Schlachter 1078a9f395 Bump minimal LGI version to 0.8.0 (#1350)
Turns out that menubar already uses features that were only added in
that version.

Fixes: https://github.com/awesomeWM/awesome/issues/1348
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-01-02 19:53:02 +01:00
Uli Schlachter 2b79165622 Add missing vim modelines in lib/
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-12-31 14:07:13 +01:00
MoreThanOneAnimal 6558164e53 Create artificial gears.color documentation.
Point from parse_color function to gears.color in documentation.
Fix minor issues (typos, indentation) in docs.
2016-11-28 20:23:46 -08:00
MoreThanOneAnimal 495e579fdb parse_color function refactoring:
- simplified parsing logic,
- return nil for incorrect input,
- update tests and doc.
2016-11-28 20:22:39 -08:00
MoreThanOneAnimal 51bbb53b30 Add references to gears.color in documentation. 2016-11-28 20:07:29 -08:00
Daniel Hahler aeab2a70e9 Fix whitespace warnings reported by luacheck (#1229) 2016-11-21 22:38:23 +01:00
Uli Schlachter f71592a00a gears.matrix: Add create_rotate_at() (#1181)
We already have a variant of this function for transforming an actual
matrix. This adds the corresponding static factory.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-25 15:37:49 +02:00
Uli Schlachter ed3aac711d Fix traceback in gears.protected_call (#1178)
The traceback should not include the error handler because this is confusing.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-22 00:54:08 +02:00
Uli Schlachter 289dfd1615 gears.surface.widget_to_*: Ignore repaints (#1155)
For some reason, the code here tried to handle widget::redraw_needed
signals even though it should apparently/obviously only produce a
current snapshot of the widget's look.

Fix this by just removing the redraw code.

While here, also factor out the widget context table into a local
variable and re-use it for the initial layout and for the later draw.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-19 12:32:30 +02:00
Uli Schlachter 259c4f716f Remove @release @AWESOME_VERSION@ everywhere (#1157)
It does not provide much value. The version number is already known to
ldoc globally in the "description" variable.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-10-09 22:36:20 +02:00
Uli Schlachter b6a3ae43fb gears.object.properties: Use the new .data table
Previously, gears.object.properties used a weak table for adding
additional information to a C object. However, weak tables can easily
cause leaks when the value references the key.

This commit makes the code instead use the new .data property that is
available on all C objects. This means we have no more magic with a weak
table and instead only use "regular" tables instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-09-30 11:11:55 +02:00
Emmanuel Lepage Vallee fb4a48b744 doc: Document where gears.shape can be used. 2016-09-26 01:21:15 -04:00
Emmanuel Lepage Vallee d5aca4ccd7 doc: Fix gears.timer documentation 2016-09-26 00:40:20 -04:00
Emmanuel Lepage Vallee 4a8a1423e8 doc: Fix improper punctuation (causing an ldoc issue) 2016-09-26 00:40:20 -04:00
Emmanuel Lepage Vallee 9b5cecf53e shape: Move_to is necessary for circle strokes 2016-09-24 14:45:09 -04:00
Emmanuel Lepage Vallee d03d63ecae shape: Add circle radius parameter. 2016-09-24 14:45:09 -04:00
Emmanuel Lepage Vallee 2475aa6e9b shape: Add the 'arc' shape. 2016-09-24 14:45:09 -04:00
Emmanuel Lepage Vallee a027589150 shape: Add pie shape. 2016-09-24 14:45:09 -04:00
Emmanuel Lepage Vallee 0394b768a0 wallpaper: Do not use the deprecated geometry access 2016-09-11 02:10:02 -04:00
Emmanuel Lepage Vallee 2e827202ec doc: Fix a matrix copy paste mistake 2016-07-22 21:55:23 -04:00
Emmanuel Lepage Vallee 441587a4de shape: Use an explicit move_to to set rounded_rect position
All other shape did it. While it usually have no side effects,
as seen in #920 screenshot from @actionless, there is instances
where this produce a invalid rectangle.
2016-07-04 14:34:41 -04:00
Uli Schlachter 2d511e2ab5 gears.object.properties: Implement read-only properties
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:31 +02:00
Uli Schlachter 6956b9f6fa gears.object: Implement read-only properties
If a getter exists, but there is no setter, then this means that the property is
read-only.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-08 20:28:30 +02:00
Uli Schlachter 0857f6f1b5 Lua: Remove calls to add_signal()
The requirement to call add_signal() was added to catch typos. However, this
requirement became increasingly annoying with property::<name> signals and e.g.
gears.object allowing arbitrary properties to be changed.

All of this ended up in a single commit because tests/examples fails if I first
let add_signal() emit a deprecation warning.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-06-04 18:23:48 +02:00
Emmanuel Lepage Vallee 490306a5fc shape: Add default rounded_rect radius
Add an arbitrary value to avoid all caller setting extra arguments.
2016-05-30 18:00:58 -04:00
Emmanuel Lepage Vallee 44a4eca40e doc: Port the shape images to the doc example system 2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee d85588babe wibox: Create a container module
Previously, the "containers" were placed in layout or widget.

They all have similar APIs and usage, so lets bring them together.
2016-05-30 17:51:19 -04:00
Emmanuel Lepage Vallee d6a7b6c645 object: Add a dynamic property example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee f810d78e7b object: Add a signal example 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee adebef629b object: Add an header description 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee b1c33fbd09 object: Add type information to documentation 2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee 4b21ca9184 object: Add dynamic properties support.
Similar systems already exist un luaobject, wibox and the declarative
widget system. This close the gap and also bring the property based
syntax to wibox and other gears.object users.

While this need to be enabled explicitly for legacy reasons, it
doesn't break the API.

Once widespread, this implementation will replace the one found
in wibox.widget.base_widget.
2016-05-18 01:23:53 -04:00
Emmanuel Lepage Vallee 11e77d5191 gears: Remove `screen`
It has been deprecated for a while and was never part of a release.
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee aa46b96369 gears.geometry: Add area_remove 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 1ce92bb550 get_rect_by_dir: Move to `gears.geometry`
Begin to break down `awful.util`
2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee dd121623b5 gears.geometry: Mutualize getbycoord 2016-05-16 14:03:00 -04:00
Emmanuel Lepage Vallee 9d13e08c63 gears: Add a geometry modules
Add an abstract geometry module to `gears`
2016-05-16 01:18:19 -04:00
Uli Schlachter 8b3f263de3 Merge branch 'traceback-with-failed-to-load-error' of https://github.com/blueyed/awesome 2016-05-15 16:31:14 +02:00
Daniel Hahler c25c0527a6 gears.surface: add a traceback for "Failed to load" errors
This is useful to see where the error is coming from.
2016-05-11 21:50:02 +02:00
Uli Schlachter aed571eb48 gears.wallpaper: Handle concurrent screen changes
The code in gears.wallpaper currently sets a wallpaper in a deferred fashion.
Only a while after it is told to do something does it actually do the wallpaper
change. This is to incorporate many wallpaper changes right after another. These
changes happens during startup where the wallpaper for each screen is set one
after another.

However, since we no longer restart on RandR changes, the screen configuration
could change while we have a pending wallpaper. In this case, part of the
wallpaper could be "chopped off", because the surface that we draw the wallpaper
to is too small.

This commit makes gears.wallpaper track the size of the pending wallpaper and
create a new surface if the already-pending one is too small.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-05-08 17:48:40 +02:00
Uli Schlachter cd55c57937 Merge branch 'root-size' of https://github.com/psychon/awesome 2016-04-15 19:35:12 +02:00
Emmanuel Lepage Vallee 00d782f3d3 awful.screen: Deprecate functions, add methods 2016-04-11 23:54:28 -04:00
Emmanuel Lepage Vallee 828543c838 gears.object.properties: Support 'obj.is_something'
Used when there a property is set by mutators instead of accessors.
2016-04-11 23:46:10 -04:00
Uli Schlachter 7863a5e65b gears.wallpaper: Use root.size()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-04-09 15:19:46 +02:00
Emmanuel Lepage Vallee 8a0738a4bc gears.screen: Merge into awful.screen
gears modules usually don't depend on Awesome C-API. This code has
been placed there for unclear reasons.

Also, there is ongoing work to unify each "concepts" API into one
single page. Having `gears.screen` go against this effort.
2016-04-06 23:32:44 -04:00
Emmanuel Lepage Vallee e24cb901cb Typo: Ajust -> Adjust 2016-04-04 00:56:11 -04:00
Daniel Hahler 3ad0a9d8d2 Merge pull request #780 from psychon/screen-add-signal
Add screen add signal
2016-04-03 18:35:08 +02:00
Emmanuel Lepage Vallee 9da40d010c gears.surface: Add methods to convert widgets to surfaces
It can be saved directly to a PNG or SVG file or used as a cairo
surface or pattern.
2016-03-31 04:45:45 -04:00