Commit Graph

304 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 5818de41ce awful: Rename awful.ewmh to awful.permissions.
It has nothing to do with EWMH since a long time. It was already used
for the requests, so lets formalize this.
2020-01-11 15:43:30 -08:00
Emmanuel Lepage Vallee efc42b1be1 autofocus: Modify `awful.autofocus` to be a request::.
This also pulls in part of the permission framework to ensure
backward compatibility is kept.

`awful.autofocus` was always weird. It is a module part of `awful`,
but it was never part of `awful` `init.lua`. Rather, `rc.lua` was
the sole place it was used. It behave exactly like a request, but
predate them by years. As I cleanup the request:: API before the
permissions API gets formalized, this has to be fixed now.

It isn't deprecated in this commit because it makes too many tests
fail. Another pull request will solve that by adding the "API level"
concept to AwesomeWM so I can change the behavior without breaking
existing configs. With that, the behavior of `autofocus` will be
enabled by default with the permissions to disable it.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 04c757322c client: Turn `rc.lua` logic into a new `request::border` signal.
The default `rc.lua` was using the focus/unfocus signals to set
the border color along with `awful.rules`. This logic block was
no longer aligned with the rest of `rc.lua` since it was
the only place where `beautiful` variables where only used by
`rc.lua`.

On top of this, the new request handler also has extra contexts
for the urgent and floating/maximixed use cases. So it can be used
by themes to implement much smarter borders than just focus based
ones. They were previously limited by the fact most of the
(un-monkey-patchable) logic was in `rc.lua`.

Note that this commit also shuffle the awful.rules order between
the titlebar and the border and changes the tests accordignly.
After some consideration, I came to the conclusion the previous
behavior was bogus and the fact that the placement tests required
to know about the titlebar height is simply a proof of that. The
change was required in this commit because since the border is no
longer in the default rules, a new buggy edge case surfaced.
2020-01-11 15:43:11 -08:00
Emmanuel Lepage Vallee 067bcaca60 client: Rename the `manage` and `unmanage` signals.
They currently fit the general concept of a `request::` in the sense
that they are not property related and have "request handlers".

The commit also add deprecation for signals.

The reason for this fits within the larger standardization project.
Non-namespaced signals will eventually be renamed. This has started
a long time ago.

What is old is new again. Once upon a time, there was a `startup`
parameter to the `manage` signal. It is now back in the form of
a context.

Finally, this commit removes the `manage` section of `rc.lua`. It no
longer did anything worthy of being in the config. Each of its
important parts have been moved out over the years and the last
remaining bit is always required anyway. The code has been moved
to `client.lua`.
2020-01-11 14:43:56 -08:00
Emmanuel Lepage-Vallee 3c26ccc424 doc: Port the `wibox` module to the new doc format. 2019-12-21 13:25:25 -08:00
Emmanuel Lepage Vallée 6ed1f643cb
Merge pull request #2937 from Elv13/more_keyboard
More awful.key / awful.button improvements.
2019-12-05 23:50:23 -05:00
Emmanuel Lepage Vallee 288e4df49b doc: Add a behavior change notification in the NEWS 2019-12-05 23:08:48 -05:00
Aire-One 3a99b91334 Fix a quirk for type render in the default format. 2019-12-05 19:05:36 +01:00
Aire-One 05e92672d6 Fix `@propemits` format mistakes. 2019-12-05 18:39:51 +01:00
Aire-One 828dabcbec Fix missing `self` parameter from signals.
The `wibox.widget` common documentation from `docs/common/widget.ldoc` was missing the first `self` parameter on mouse signals.
2019-12-02 13:19:46 +01:00
Emmanuel Lepage Vallee f21e0ba9dd doc: Upgrade the widget layout documentation. 2019-11-30 01:26:06 -05:00
Emmanuel Lepage Vallee 4168462b33 doc: Add an `@interface` tag.
Unlike `@baseclass`, some methods (like :reset()) and properties
are implemented across multiple classes.
2019-11-29 01:26:25 -05:00
Emmanuel Lepage Vallee 3508b6a18b doc: Add an `@introducedin` tag.
It is optional for now, but maybe in the future we can make
it mandatory. It will allow to have some "New!", "Not released"
messages or something in the doc. That would allow us to share
most of the doc between the stable and git versions.
2019-11-29 01:26:25 -05:00
Emmanuel Lepage Vallee 6f92f60076 doc: Add more deprecation related tags.
They do nothing for now, but once we are done adding them to
everything, they will replace the old `@deprecated` family of
type-tags.

They carry more information such as when it was removed and why.
Cross-referenced with the @version, we can infer the deprecation
status based on the current release rather than a boolean
"deprecated or not deprecated".
2019-11-29 01:26:25 -05:00
Emmanuel Lepage Vallee ec7cac5dbf doc: Add a summary next to the property/method title. 2019-11-29 01:26:25 -05:00
Aire-One 46c86351a0 Add ldoc tags for inherited members.
* Add `@inheritedproperty`, `@inheritedmethod` and `@inheritedsignal` ldoc tags to specify inherited members in the documentation,
* These new tags create their own section in the rendered documentation,
* Implemente these tags for `docs/common/object.ldoc` and `docs/common/widget.ldoc`.
2019-11-29 01:26:25 -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
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
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
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 4dbc83fa7d doc: Modify the template to allow merging sections.
It might not be the most pretty of change, but it works. With this
change, it is possible to have multiple "things" in the "same"
section having the "same" name.

This allows for C/C++ style functions with the same name but different
signatures. Lua doesn't handle this well, so it should usually be
avoided. However, constructors might be a valid exception. Most older
widget (and object) constructors have multiple random argument while
newer one use `args`. Deprecating the old ones for the sake of
standardization might be a bit too much for users upgrading from v3.5.

Given the only reason all of those deprecation would happen is because
"its pretty that way", then lets allow 2 constructors and avoid outrage.
2019-11-03 01:28:29 -05:00
actionless 68651477fb refactor(test: awesomerc: hotkeys): imitate fake vim client instead of depending on vim as test dep 2019-10-18 19:02:47 +02:00
actionless e048c4200c style(readme): remove dots at the end of the list items 2019-10-18 18:52:44 +02:00
actionless 0333cddfa2 doc(readme): add xterm to test deps 2019-10-18 18:50:43 +02:00
actionless e78d711846 doc(readme): add vim to test deps 2019-10-18 18:45:18 +02:00
Xinhao Yuan 0e8dd4c1c9 Added more tests to check partial maximization handling, which require wmctrl as an optional dependency. 2019-10-17 18:54:29 -04:00
Emmanuel Lepage Vallee cf0385af80 widget: Add an `:add_button()` method.
This is done now because a lot of code in `lib/` add buttons by manually
extracting buttons from awful.button. Instead of adding ugly code to
prevent using the legacy API, do this.
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee 3d918258e2 widget: Turn `:buttons()` into a normal property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 0cb22fd203 awful: Move the backward compatibility code into its own file.
The reason for this is that as more of CAPI is brought in line with the
current API guidelines, it is more and more likely the tests will hit
APIs shims (either to test them or because the prototype remains the
same and only the implementation moved to Lua).
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 96c4d001f1 doc: Remove capi.button/capi.key from the official doc.
`awful.button` is always the one used and it's confusing.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 585e321578 doc: Fix a regression from a recent commit.
There was an off-by-one in the substring for the parameter names.
2019-10-05 17:20:29 -04:00
Emmanuel Lepage Vallee 271e2822a7 build: Allow Awesome to be built with luarock LGI. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallée 74410e9490
Merge pull request #2890 from Elv13/doc_args
Improve (and fix) the doc.
2019-10-02 13:42:03 -04:00
Emmanuel Lepage Vallée 6dd8daa2ce
doc: Add bacj an accidently removed section. (#2885)
This was probably due to copy pasting from the preprocessed file
back to the raw file.

Fix #2882
2019-10-01 12:49:28 -04:00
Emmanuel Lepage Vallee 5de1e36007 doc: Use braces for names function arguments.
Use {} for all functions with take `args` as sole parameters instead
of (). Also color them differently to highlight this isn't a typo.
2019-10-01 02:03:12 -04:00
Emmanuel Lepage Vallee 8704b8d89a doc: Move the core components to the top of the doc index.
They are the most important, they should be the most visible.
2019-10-01 01:18:15 -04:00
Emmanuel Lepage Vallee dcdbc679f7 doc: Add a file to ldoc blacklist before addint it.
Add `dpi.lua` to config.ld even if it isn't added yet. This is
because the way the test run has it cached in the build dir. A full
rebuild would take too long and timeout on travis for semi-large PRs.
2019-09-29 18:19:45 -04:00
Emmanuel Lepage Vallee b40083780e matcher: Add a "every" and "every_any" sections to the rules.
So far the "any" rules had a "OR" and "NOT" logic "gates", but not
an "AND".
2019-08-03 18:26:06 -04:00