Commit Graph

10043 Commits

Author SHA1 Message Date
Aire-One fcc3d0b590 Add an option to draw clients.
Change how wibox are drawn to build a more flexible function reusable in the context of clients.
Add `clients` option to the template. This new option needs an associative table `{ ['label'] = client }` to work. Where label will be a text rendered on the middle of the client area.
Add a new example: `texts/examples/screen/tiled_clients.lua`.
2019-11-28 13:31:21 +01:00
Emmanuel Lepage Vallée e411500dda
Merge pull request #2924 from Elv13/extend_doc
Extend the documentation with new custom tags.
2019-11-27 14:07:11 -05:00
Emmanuel Lepage Vallée c34d2577ea
Update docs/config.ld
Co-Authored-By: Yauhen Kirylau <actionless.loveless@gmail.com>
2019-11-27 13:11:20 -05:00
mergify[bot] 304d742068
Merge pull request #2923 from psychon/tag_delete_emit_screen_signal
Emit property::screen in tag:delete()
2019-11-27 10:50:47 +00:00
Emmanuel Lepage Vallee 9c63b20b62 doc: Generate a summary of some noteworty tags. 2019-11-27 01:44:23 -05:00
Emmanuel Lepage Vallee a3a2fc1344 doc: Hide the newly auto-generated content by default.
First of all, yes, JavaScript in the doc. I don't like this either.

The reason is that the new sections are super useful *when you need
them*. However, in practice, that's rare. So better not make the
signal to noise ratio worst. Future commit will introduce an
auto-generated summary of what's hidden.
2019-11-27 01:44:23 -05:00
Emmanuel Lepage Vallee ee912671eb doc: Add a standard `@propbeautiful` tag.
This allows to state that this variable has a equivalent beautiful
variable named using the usual conventions. It will generate all
the boilerplate magically and also takes optional fallback variable
names.
2019-11-27 01:44:23 -05:00
Emmanuel Lepage Vallee deca2880c5 doc: Add a new `@propemits` for common property signals.
This adds a lot more boilerplate than `@emits`. In turn, it avoids
copy/pasting some code for *all* properties.
2019-11-27 01:44:23 -05:00
Aire-One 185ad15140 Add inheritance tags to `docs/common/wibox.ldoc`. 2019-11-27 01:44:23 -05:00
Aire-One 589908adef Add inheritance tags to `docs/common/widget.ldoc`. 2019-11-27 01:44:22 -05:00
Aire-One 550e346d7b Add inheritance tags to `docs/common/object.ldoc`. 2019-11-27 01:43:07 -05:00
Aire-One bc35da73ac Implement inheritance into ldoc template.
This use the new `@baseclass` and `@inherited` tags to add inheritance data to the rendered documentation.
2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee 4102e6a503 doc: Update the template to render sub-tags.
Sub-tags are a new concept and is equivalent to @tparam, but in
a generic form.
2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee a6add4dab6 doc: Add explicit inheritance support.
Adding a `@baseclass` tag will help detect inherited methods and
properties without hacks.
2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee e1ddde7703 doc: Add a new custom tag to list the theme variables used by a method. 2019-11-27 01:43:07 -05:00
Emmanuel Lepage Vallee ee89e7c686 doc: Add a new custom tag for signals emitted by a method. 2019-11-27 01:43:00 -05:00
Emmanuel Lepage Vallee 7831a3f58d doc: Re-implement tag parsing in the config.
So, now ldoc is implemented within ldoc, great!

This is done to allow new custom tags to have the same power and
expressivness as built in ones. This way we can express signals
and theme variables correctly.
2019-11-27 01:41:04 -05:00
Uli Schlachter 8d2c986936 Emit property::screen in tag:delete()
Before this commit, the code directly modified the table where the tag's
properties were saved. This commit changes the code to call
awful.tag.setproperty() instead. This function ensures that
property::screen is now also emitted.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-11-27 01:39:11 -05:00
mergify[bot] e3b15b4405
Merge pull request #2922 from Aire-One/doc_screen_images
Documentation `screen` - Improvement on generated images.
2019-11-26 15:22:55 +00:00
mergify[bot] 42ec9c4ecf
Merge pull request #2925 from SethBarberee/gears-iterate_value
More gears.table tests
2019-11-26 15:16:00 +00:00
Jordan Christiansen c09e5b16b7 Correct the name of get_children's return value (#2927)
get_children's return value should not be called "The". That was a
mistake because ldoc requires a name for return values and parameters.
If a name isn't provided, it thinks the first word of the description
is the name.
2019-11-25 17:04:01 -05:00
Jordan Christiansen f8a9c59d50 Improve textclock property docs (#2926)
* Add format docs to the constructor.
* Add timezone docs to the property.
* Give the argument to set_refresh a name other than "How".
* Fix bug in constructor argument "format" rendering.
2019-11-25 16:35:41 -05:00
Seth Barberee 5d499db3d0 add tests for find_keys and hasitem 2019-11-25 14:09:29 -06:00
Aire-One 3791daaeaf Add wibar drawing to screen properties images. 2019-11-22 14:40:21 +01:00
Aire-One 92f698bbae Add an option to draw the wibar on screen images.
Add a new option to the screen image template: `draw_wibar`.
This option draw the wibar on the generated image.
2019-11-22 14:40:21 +01:00
Aire-One 3830e9de35 Invert rulers insertion order.
Rulers insertion order impact the result of the bubble sort algorithm.
By inverting the order, we can make the output image looking more natural.

Awesome's screen properties can be seen like this:
* The screen has a geometry (its size) ;
* Inside there is the workarea ;
* Inside there is the tiling_area.

It seems better to draw rulers in this order.
2019-11-22 14:39:52 +01:00
mergify[bot] 76f8c11776
Merge pull request #2920 from jcrd/taglist-update
Update taglist more aggressively
2019-11-21 10:29:32 +00:00
James Reed 1e71d9afbd
Update taglist more aggressively 2019-11-20 10:52:55 -07:00
Emmanuel Lepage Vallée 9bc6d4aa40
Merge pull request #2894 from Elv13/xmas_2k18_2_merge_p3
API standardization part 2
2019-11-09 17:13:19 -05:00
Emmanuel Lepage Vallee ee331a4eff keygrabber: Remove the hardcoded way to add keybindings.
There is now a real API for this.
2019-11-09 16:43:53 -05:00
Emmanuel Lepage Vallee 944ef213e6 tests: Try both the `args` and parameters based `awful.{key,button}`. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 4723c3218a tests: Make sure the legacy buttons/keys method are converted back. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 12a7d026c2 tests: Test the new key/button binding API 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 10fd4e8883 object: Try harder to auto-undeprecate the keys and buttons.
Having the new object layout will be important soon when the
append/remove methods start to get added to the client and the
reborn `awful.keyboard` module.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee e3959b45d5 awful.button: Keep track of the `awful.button` in the `capi.button`. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 42a906f300 capi.button: Enable the miss handlers. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee fe603f7dc5 capi.key: Enable the miss handlers. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee afbb3b7faf shims: Add the legacy _keys and _buttons to the client shims. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee f4cfb99cde shims: Update the `button` and `key` shims to be objects.
Now that something actually tries to set the index handlers, it
cannot be a dumb function anymore.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 35a4b4edbf object: Allow old `gears.table.join` accessors to be set to `false`.
This worked before, so it has to work again.

Fixes #2915
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 45823f230a capi: Move from `.data` to `._private` for the property data.
This will bring the CAPI classes closer to the gears.object ones.

Fixes #2897
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 50eb7d5599 Revert "legacy: Temporary workaround for #2897. (#2898)"
This reverts commit e888d983ef.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 025262fd95 doc: Use the new doc convention.
The previous few commits are very old, bring them to the new
standards without all the merging conflicts (which are error prone).
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 02486b3479 awful.key: Add a has_root_binding property and :trigger() method 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 4f7388dd17 awful.button: Add a has_root_binding property and :trigger() method 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 93b90026e9 root: Add a `has_key` and `has_button` functions. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 86d8ef3142 awful.button: Turn into an object. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 21ae9c1edb awful.key: Turn into an object. 2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 3b5db8a9be rc.lua: Add root keys and buttons instead of setting the list.
As visible in various modules and even built-in components like
`awful.keygrabber`, it was previously necessary to work around the
fact that keybindings could not be added later without using some
low level API hacks.

From now on, `rc.lua` will be a good citizen and use the same APIs as
the module to manage keybindings.
2019-11-09 16:43:12 -05:00
Emmanuel Lepage Vallee 4501f0e768 Allow to add and remove keys and buttons.
Another step in moving these APIs toward the common object oriented and
declarative paradigms used by other APIs.

This commit introduces the `awful.keyboard` module. It currenly only
exists as a placeholder for the first few append/remove function, but
will grow in scope in another pull request to expose the currently
private modifier APIs and to provide keybindings collision detection
and replace some of `awful.hotkey_popup` business logic.

The `keygrabber` tests which uses root keybindings are disabled for
now to keep the commit size small. This is necessary since the shims
will need many iterations of changes before this work again with the
new syntax.
2019-11-09 16:42:06 -05:00