Commit Graph

10258 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee b1a4b1dd9a doc: Add a flowchart for ruled.client. 2020-01-19 02:58:46 -05:00
Emmanuel Lepage Vallee 171a14dbc8 tests: Port the hardcoded awful.rules test to the sequence template. 2020-01-19 02:58:41 -05:00
Emmanuel Lepage Vallee 71c230035c rules: Move `awful.rules` to `ruled.client`.
From now on, all core object will have their own rules. `awful.rules`
hardcodes some client specific code. All `rules` module have some form
of class specific code. This code will now be part of a new module
called `ruled`. Since a year or so, a lot of work has been done to
refactor the rules on top of the shared `gears.matcher` class. This way
there wont be as much duplication.
2020-01-19 02:58:37 -05:00
Emmanuel Lepage Vallee 39c90b8303 hotkeys: Port away from awful.rules 2020-01-19 02:39:30 -05:00
Emmanuel Lepage Vallee 84e6bbb86d doc: Improve the common documentation between all rules modules.
It was missing lesser/greater and the `id` type wasn't rendered
properly.
2020-01-19 02:39:30 -05:00
Emmanuel Lepage Vallee fc526d2aef build: Configure the `ruled` module dependency graph.
It is the topmost module, it can use everything, but nothing can use it.
2020-01-19 02:39:30 -05:00
Emmanuel Lepage Vallee 104eac0bec doc: Update the ldoc config to handle the new ruled module. 2020-01-19 01:55:54 -05:00
Emmanuel Lepage Vallee 2b11fcfd1c doc: Add a section for rules matching properties.
It also change the text of "clientproperties" to be more generic so it
can apply to other type of rules.
2020-01-19 01:55:54 -05:00
Emmanuel Lepage Vallee 6ee294fd5a doc: Make sure the ruled module init.lua is ignored.
This has to be in its own commit otherwise Travis will fail. This
is because it will keep the file in the build directory when
iterating all commits. Then `ldoc` will fail because the file doesn't
have documentation. If `config.ld` is updated first, then it will
fail because `ruled/init.lua` doesn't exist yet. When it is done
in a separate commit, then `config.ld` is already updated and comes
with `init.lua`.
2020-01-19 01:55:54 -05:00
Emmanuel Lepage Vallee da8daa8dfc debug: Allow "deprecated_in" for class deprecation. 2020-01-19 01:55:51 -05:00
Emmanuel Lepage Vallée 5ad02d0b8b
Merge pull request #2948 from actionless/vim-keys-add-folds
Vim hotkeys: add folds
2020-01-18 16:56:33 -05:00
mergify[bot] 6f51882398
Merge pull request #2967 from SethBarberee/calendar_popup_pic
Add calendar_popup test
2020-01-18 21:44:38 +00:00
Seth Barberee ab6381686e add calendar_popup pic to doc 2020-01-17 16:02:18 -06:00
mergify[bot] 67672bf5a1
Merge pull request #2964 from feltcat/typos
Fix some typos and grammar in new widgets documentation
2020-01-14 19:45:59 +00:00
feltcat 358c6f50b6 Fix typos and grammar in new widgets documentation 2020-01-14 05:22:03 +00:00
Emmanuel Lepage Vallée e0bb29962d
Merge pull request #2941 from Elv13/api_stanard_p3_0
API standardization, part 3
2020-01-11 16:36:27 -08:00
Emmanuel Lepage Vallee 6ecab5f2f1 doc: Add documentation in each objects which emit request:: signals. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee e208b81763 doc: Add a @request tag to document the request:: contexts. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 257556793a doc: Document the client request::default_keybindings signal. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 7705ef9f1e doc: Add a @classsignal tag.
To be used to denote when a signal only exists on a class, rahter
than on instances + class.
2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee e77dd01e5a Add more TOVOv5 for unfixable APIs.
Another pull request at some point will add proper API levels,
it will then become possible to fix these without breaking
the API for everybody. However right now there is no way around
the problems.
2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee c5202a4870 tag: Add a context to request::select. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 839dddee25 tests: Test the tag `request::layouts`. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 6b427e73a8 tag: Add a request::layouts signal and append/remove layout. 2020-01-11 15:43:31 -08:00
Emmanuel Lepage Vallee 668ed6135c client: Add a `:grant()` and `:deny()` method for permissions.
This is a lower level API than what most people will end up using
(the rules), but it is useful enough to expose to the public API.
2020-01-11 15:43:31 -08:00
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 5ad0856fee layout: Add a `request::default_layouts` to fill the list of layouts.
This will allow the default client layout list to be manipulated by
modules without the risk of overwriting each other.

The commit also add a new `--{{{ Tag --}}}` section to `rc.lua`. It will
be expanded once the tag rules get merged.
2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 8365dbc1b6 tests: Test rc.lua `c:activate()` actions. 2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee b51a20670b tests: Test client.active. 2020-01-11 15:43:15 -08:00
Emmanuel Lepage Vallee 55a097efc7 client: Update existing code to use `property::active`. 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 c10bdc3cfe client: Add a property::active signal. 2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee ba5385dd40 client: Update existing code to use `c.active`. 2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee 58f3ea740f client: Add an `active` property to check if a client has focus.
This follows in the footsteps of:

 * request::activate
 * awful.ewmh.add_activate_filter
 * c:activate{}
2020-01-11 14:43:56 -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 1434ea4c8b rc.lua: Get rid of the focus related imperative logic. 2020-01-11 14:43:56 -08:00
Emmanuel Lepage Vallee cd253ed815 client: Add an `activate` method.
This method aims to provide a centralized, declarative API to focus
clients. Currently, there is tons of code using "request::activate",
including `rc.lua` and have extra boilerplate code around it to
handle some corner case (such as minimization and clients already
having the focus).

This code takes room, is repetitive and force some imperative logic
to be in `rc.lua`.
2020-01-11 14:43:56 -08:00
mergify[bot] 6eef064da5
Merge pull request #2958 from SethBarberee/cache_doc
Docify gears.cache
2020-01-06 21:01:28 +00:00
Seth Barberee b9bb9cbe69 add docs for gears.cache 2020-01-05 20:58:36 -06:00
Emmanuel Lepage Vallée b8c83fdf9c
Merge pull request #2949 from Elv13/more_trivial_doc
More trivial doc fixes
2019-12-28 12:29:19 -08:00
mergify[bot] edd7d40545
Merge pull request #2952 from erik-f/master
wibox.container.margin: Allow nonnegative dimensions
2019-12-28 09:42:25 +00:00
erik-f 56f2fcfccc
wibox.container.margin: Allow nonnegative dimensions
Commit f025409 avoided negative dimensions but 
also stopped allowing width and height to be zero.

For widgets like awful.widget.watch it is reasonable 
to allow dimensions to be zero because in many cases when 
the margin container is being calculated the watch widget is 
still computing and therefore has width and height zero.
2019-12-27 12:36:54 +01:00
Emmanuel Lepage-Vallee 833948ea67 doc: Polish the awful.widget doc.
A lot of them were missing the inheritance includes.
2019-12-21 21:53:57 -08:00
Emmanuel Lepage-Vallee 9f42f57a76 doc: Upgrade the gears.timer documentation to the new standards. 2019-12-21 21:35:12 -08:00
Emmanuel Lepage-Vallee c32c2bf43d doc: Upgrade the keygrabber to the newest standards. 2019-12-21 21:27:21 -08:00
Emmanuel Lepage-Vallee 3af095e4b0 doc: Upgrade the tooltip documentation to the new standards. 2019-12-21 21:20:11 -08:00
Emmanuel Lepage-Vallee 0393c93f42 doc: Upgrade the wibar documentation to the new standards. 2019-12-21 20:58:53 -08:00
Emmanuel Lepage-Vallee 6e4eb134b0 doc: Upgrade the `awful.popup` documentation to the new standards. 2019-12-21 13:39:46 -08:00
Emmanuel Lepage-Vallee 3c26ccc424 doc: Port the `wibox` module to the new doc format. 2019-12-21 13:25:25 -08:00