Commit Graph

10023 Commits

Author SHA1 Message Date
Aire-One 02b1a6b633 Fix missing `self` parameter in documentation usage examples. 2020-01-28 10:57:43 +01:00
Emmanuel Lepage Vallée d9998dedd2
Fix an `rc.lua` comment typo. (#2974)
I don't know how it got there. Either copy/paste or find and replace
mistake.
2020-01-25 18:20:30 -05:00
Emmanuel Lepage Vallée 2f905f2522
Merge pull request #2895 from Elv13/ruled_client
Move `awful.rules` to `ruled.client`.
2020-01-19 20:15:52 -05:00
Emmanuel Lepage Vallee b8fbeb95c6 rc.lua: Switch from `awful.rules` to `ruled.client`.
It's the same module, but with a new name. The commit also switches
from the "one off" rule write to the incremental and signal based one.

This allows modules to add their own rules without having a race
condition against `rc.lua` and other modules. Previously, if a module
wasn't designed to prevent it, rules got destroyed each time.
2020-01-19 20:30:06 -05:00
Uli Schlachter 8df463f971 doc: Improve the client documentation. 2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee cb9c33cda8 "Really" deprecate the client marked and unmarked signals.
The doc said they were deprecated in 4.0, but back then there was
no API to deprecate signals.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 46026ccc2e doc: Fix a regression that added another space in the URL.
This will break some existing links, but oh well, it isn't the first
time and some websites cannot render URLs with spaces in them. This
means external references to some of the input doc are currently
impossible.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 31e0a3e67b doc: Fix the item summary rendering.
* Correctly count the elements
 * Use singular and plural tense properly
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 74ba84b299 doc: Make use of the @classsignal tag.
It wasn't doing anything until now.
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 575b0f12dc doc: Remove all type aliases.
They render poorly and serve no purpose.

    #!/bin/bash
    for FILE in $(git ls-files | grep -E "\.(h|c|lua)" | grep -v tests | grep -v spec); do
        sed -i 's/^[ ]*--*[ ]*@client /-- @tparam client /g' $FILE
    done
2020-01-19 20:30:06 -05:00
Emmanuel Lepage-Vallee 5e720c9744 doc: Major client documentation backfill.
This commit mostly rewrite the client documentation and pay the
technical debt accumulated over the years. Most of the client
documentation was still one-liners from the luadoc era. It now
has all the new tags, type. It also has actual description of
what the properties do beyond the name.
2020-01-19 20:11:19 -05:00
Yauhen Kirylau 37aa23be86 fix(gears: string: split): support more delimiters (#2962) 2020-01-19 19:04:28 -05:00
laith-m0 65512b5ea9 Fix prompt navigation (#2970)
1. Open any awful.prompt(mod+r or mod+x)
2. Type ()->
3. Press alt+b two times
2020-01-19 19:00:56 -05:00
Emmanuel Lepage Vallee 20743a9a16 Remove all usage of the now deprecated `awful.rules`. 2020-01-19 02:59:10 -05:00
Emmanuel Lepage Vallee e309059f4c doc: Add more example to awful.client. 2020-01-19 02:58:49 -05:00
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