Commit Graph

818 Commits

Author SHA1 Message Date
hung 4eff88679c new shape: star 2020-03-28 20:21:39 +07:00
mergify[bot] 5d1394b91d
Merge pull request #3041 from SethBarberee/tag_gap_doc
[Doc] add example for master_count in awful.tag
2020-03-20 12:46:16 +00:00
Seth Barberee 6d24dc2ab7 add example for master_count 2020-03-20 01:00:53 -05:00
Seth Barberee 5c7574bce8 convert hotkeys_popup to awful.popup instead of wibox 2020-03-19 10:51:51 -05:00
Emmanuel Lepage Vallée 2da1cb9ba0
Merge pull request #3040 from Elv13/notif_icons_v3
[RFC] Redesign how notification icons are handled.
2020-03-18 21:35:29 -07:00
Emmanuel Lepage Vallee 64fb498422 tests: Test the newly added notification icon request handlers. 2020-03-16 04:44:15 -04:00
Emmanuel Lepage Vallee 32fd11a220 naughty: Move the get_icon implementation to 2 request handlers.
They can now be disconnected or extended.
2020-03-16 04:44:10 -04:00
Emmanuel Lepage Vallee 9e19e7a18c tests: Test naughty request::icon. 2020-03-16 04:43:55 -04:00
Emmanuel Lepage Vallee a3c37382be naughty: Add a new request::icon for the main icon.
My initial implementation was overly optimistic. It turns out there
is no end in sight to "correctly" support icons. Apps randomly use
XDG name, paths and URLs. Rather than baloon the size of the
implementation, this commit moves toward to request:: pattern
found in other APIs. This will allow people who wish to "fix"
specific icons to do so in a way that scales.

The next 2 commits will move the current implementation to request
handlers.
2020-03-15 03:35:40 -04:00
Emmanuel Lepage Vallee 9cf717b994 naughty: Replace request::icon by request::action_icon.
It wasn't a good idea to use ::icon because sometime the notification
themselves needs to request assistance for their icons.
2020-03-14 20:21:35 -04:00
ArenaL5 e5566c0415 Add a test for awesome.get_key_name()
Signed-off-by: ArenaL5 <arenal5@gmx.com>
2020-03-14 19:33:04 -04:00
Emmanuel Lepage Vallee b8e00b245f tests: Trigger the widget "update content" code path. 2020-03-08 20:14:53 -04:00
Emmanuel Lepage Vallée dd289e5ab2
Merge pull request #2853 from Elv13/notif_rules
Add the notification rules.
2020-02-22 18:48:27 -05:00
Seth Barberee b3766c0544 add two examples for awful.wibar 2020-02-20 04:51:44 -06:00
Emmanuel Lepage Vallee f50a84b70b tests: Disable the default `rc.lua` rules for the sake of testing. 2020-02-17 04:41:28 -05:00
Emmanuel Lepage Vallee 2d477383ee tests: Test the notification rules. 2020-02-15 20:33:21 -05:00
Emmanuel Lepage Vallée 59b31e74b3
Merge pull request #2988 from Elv13/notif_rules_groundwork
Fix multiple notifications issue
2020-02-15 17:59:28 -05:00
Emmanuel Lepage Vallée 10e32198e7
Merge pull request #2982 from Elv13/modeline
Support shebangs (#!), modelines, API levels and add more doc.
2020-02-15 17:53:41 -05:00
mergify[bot] fd237b9cd8
Merge pull request #2991 from psychon/cleanup_tag_history
Cleanup tag history on screen removal
2020-02-13 00:31:04 +00:00
Uli Schlachter 38a2a524a7 Cleanup tag history on screen removal
The tag history kept a strong reference to a screen even after that
screen was removed. This prevented the garbage collector from cleaning
up.

Fix this by getting rid of the tag history on screen removal.

Related-to: https://github.com/awesomeWM/awesome/issues/2983#issuecomment-584249568
Signed-off-by: Uli Schlachter <psychon@znc.in>
2020-02-12 20:33:21 +01:00
Emmanuel Lepage Vallee ad880080f4 tests: Better test how the `box` notification handle screens.
Right now, there is still a memory leak *only* when there is active
`box` notification when the screen is removed. I failed to identify
where *this* leak is comming from. The previous few commits fix
~5 other leaks.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 21caa19a21 naughty: Add a way to revert to the legacy mode.
When `rc.lua` will use the new notification API by default, we need
a way to revert back to the lagacy mode to be able to test it.
2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee ee80fe052f init: Add an API level concept to `capi`.
The API level concept is something used by other projects such as
Android and iOS to allow deprecated features to be removed and the
bahavior to be altered without breaking compability with existing
code.

The same will apply to AwesomeWM. The current API level is "4" and
as long as config use this, no deprecation or bahavior change will
be exposed. If the user sets it to an higher value or we release
the next major version and new users start to use the, then current,
default config, they will use the new API level.

The the far future, if ever, we could fork the entire Lua libraries
to support legacy APIs. This would only require to keep the core
API support for those legacy calls. In the meantime, `gears.debug`
will use this to manage the deprecation and some conditional code
will be added as a last resort attempt to preserve behavior
compatibility while moving forward with breaking changes.
2020-02-08 17:18:01 -05:00
Emmanuel Lepage Vallee c616400239 cmd: Add an option to force the command line arguments.
The next commit will add modeline support. By default, modelines have
the final work on which options to set. However, mostly for testing,
this isn't flexible enough.
2020-02-08 17:12: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 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
Seth Barberee ab6381686e add calendar_popup pic to doc 2020-01-17 16:02:18 -06: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 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 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 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 ba5385dd40 client: Update existing code to use `c.active`. 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
Seth Barberee b9bb9cbe69 add docs for gears.cache 2020-01-05 20:58:36 -06:00
Seth Barberee d05b7d80f1 gears.string doc revamp 2019-12-19 09:52:03 -06:00
Seth Barberee 9e3c418a03 add gears.table.cycle_value (#2942) 2019-12-12 22:10:10 -08:00
Emmanuel Lepage Vallee b48527b672 tests: Test more of awful.mouse 2019-12-06 01:41:42 -05:00
Emmanuel Lepage Vallée d2b7d292b0
Merge pull request #2939 from SethBarberee/layoutbox-doc
Add layoutbox example
2019-12-06 00:18:24 -05:00
Emmanuel Lepage Vallee 90ddbb9cd0 doc: Add `local` in the launcher example.
It caused some versions of luacheck to bark.
2019-12-05 23:51:00 -05:00
Seth Barberee 431791accc add layoutbox example 2019-12-05 23:48:55 -05:00
Emmanuel Lepage Vallee 38b5527825 tests: Test adding and removing key/mouse bindings on existing clients. 2019-12-05 22:50:02 -05:00
Emmanuel Lepage Vallee a53ff7418e tests: Add more global awful.key in test-awesomerc.
This forces the hotkey popup to have pages.
2019-12-05 22:48:56 -05:00
Seth Barberee 7440cf66f0 more docs for launcher (#2935)
Co-Authored-By: Aire-One <Aire-One@users.noreply.github.com>
2019-12-04 00:08:40 -05:00
mergify[bot] a0386dad91
Merge pull request #2921 from Aire-One/doc_fix_modules_summaries
[Draft/Proposal] DOC - Fix modules summaries.
2019-11-29 06:22:34 +00:00
Aire-One 3e6c33af64 Add imagebox doc example for `resize` property. 2019-11-28 13:53:59 +01:00
Aire-One 86a9bbfd71 Improve the `wibox.widget.imagebox` descrition.
* Add a better descrition for the `imagebox` role in the wiboxes system ;
* Improve image + code render and integration into the descrition ;
* Add a second code exemple to show both coding style (imperative and declarative).

I think the user can now have a better overview of what's a `wibox.widget.imagebox` and how to use it.
2019-11-28 13:53:59 +01:00
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
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
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 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 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 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
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
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
Xinhao Yuan 33570e45d7 Added a test to check if window state is restored after a client unmaximizing itself. 2019-10-16 18:23:21 -04:00
mergify[bot] 344964a44a
Merge pull request #2529 from actionless/hotkeys-popup-dont-show-empty-groups
fix(awful: hotkeys_popup): don't show group label if group itself is empty
2019-10-12 22:14:48 +00:00
actionless 0374bf1b1b test(awful: hotkeys_popup): test pagination and app-specific hotkeys (on vim example) 2019-10-11 15:33:43 +02:00
Emmanuel Lepage Vallee 2c08c2fa39 quality: Port all legacy `:buttons()` to `.buttons`. 2019-10-06 03:50:56 -04:00
Emmanuel Lepage Vallee fa414a86a3 tests: Test `widget:add_button()` 2019-10-06 03:50:56 -04:00
Emmanuel Lepage Vallee b23a2e81c5 tests: Stop using the legacy layoutbox constructor.
(done in a commit so the CI can test some commits with the old
constructor)
2019-10-05 22:57:05 -04:00
Emmanuel Lepage Vallee cbb90d8bd1 root: Turn `root.keys()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 296ad18922 client: Move the `c:keys()` method to a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 29e804a4f8 drawin: Turn `:buttons()` into a property. 2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee d5dd3fc794 tests: Test root.buttons
Try both legacy and standardized code paths. Also try invalid mixes of
them in case some modules abuse of rc.lua and ingest the wrong format
by accident.
2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee 141aca2432 root.buttons: Move to Lua.
This is the groundwork commit to support using `awful.button` objects in
`root.buttons`.
2019-10-05 18:06:51 -04:00
Emmanuel Lepage Vallee b1c81c4258 awful: Set a miss handler for capi.root
There is no better place to put it and need to always be required
for backward compatibility. Given Awesome no longer works properly
without `awful`, I put the code there.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 95500ea71c root: Add support for setting a miss handler.
This will allow to port some functions from C to Lua, such as supporting
`awful.key` directly when setting the buttons.
2019-10-05 18:06:50 -04:00
Emmanuel Lepage Vallee 3aafa64ea7 tests: Import the backward compatibility API for all the tests.
This isn't very nice and pulls all sort of almost useless code into
the shims, making them less atomic. However the next few commits
will start another round of API standardization and the compatibility
layer wont be optional anymore.
2019-10-05 18:06:50 -04:00
Aire-One dd69936bed Add a `gen_vertical_space` function to keep spacing from missalignment. 2019-10-05 17:16:22 -04:00
Aire-One 4abb05c590 Align timeline dots and text. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallée ffe7c4d1cc Apply suggestions from code review
Thanks to @Aire-one for those fixes!

Co-Authored-By: Aire-One <Aire-One@users.noreply.github.com>
2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee c2a2c789e6 doc: Add example sequences for the tags. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee fa2433192a doc: Add some screen example sequences. 2019-10-05 17:16:22 -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 Vallee 9c0e16e623 doc: Add examples for the various maximization. 2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 12f28305a0 tests: Add a sequence template.
This template allows to display a sequence of events for the clients,
tags and screens. Currently, it is hard to display images where the
state of an object is more complex than "here how it was before" and
"here how it is now". With this template, it is possible to have a
timeline of events from the initial states to the final states.

Now, as the line count shows, this isn't small. It is in fact an
enormous template. Worst still, this commit is the first *half* of
it. The second half adds the ability to `print()`, display
inline code and support mouse and keyboard events. The code also isn't
world class. Maintaining this template might be non-trivial in the
long run. I am fully aware of those issues. On the other hand, there
is ~100 places where this will be used once the entire
"new rule library" project is completed. This will bring the ~1.2k
line of code to ~12 lines per consumer. From that point of view,
it makes a lot more sense to merge this given how useful it is
at explaining changes within the "core objects".

It is also important to keep in mind that there is currently very
little or no documentation (beside the mandatory one-liner summary)
for these concepts. Those are the most important aspects of AwesomeWM
API and they are the least documented. This is just wrong.
2019-10-05 17:16:22 -04:00
Emmanuel Lepage Vallee 6b4b09adc5 doc: Fix the UML template svg generation.
It was mixing the actual HTML relative path with the build directory
path. This doesn't work universally. It didn't work on `awesome-www`
builder.
2019-10-01 02:07:05 -04:00
Emmanuel Lepage Vallée 85c8d5e205
Merge pull request #2854 from Elv13/uml_magic
Add some navigation helpers to the doc (in the form of UML tables)
2019-10-01 00:56:20 -04:00
Emmanuel Lepage Vallee 0419de2a60 tests: Test the screen name. 2019-09-30 00:49:40 -04:00
Emmanuel Lepage Vallee 994034934e tests: Test `s:split()`. 2019-09-29 19:07:24 -04:00
Emmanuel Lepage Vallee 3a12e6d274 tests: Test Lua side screen management. 2019-09-29 19:07:24 -04:00
Emmanuel Lepage Vallee 68488f6218 tests: Test screen.automatic_factory 2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 553cafccde tests: Test the error notifications when no screens are present.
This happens in early initialization when AwesomeWM is started with
`--screen manual`.
2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 067f8f4ebf tests: Use --screen manual for both code coverage jobs. 2019-09-29 18:56:06 -04:00
Emmanuel Lepage Vallee 53fc364ede shims: Update to handle Lua-side screen managment. 2019-09-29 18:20:15 -04:00
Emmanuel Lepage Vallee fa7f1d689e tests: Change only_on_screen to create fake screens "in sight".
Previously, it would create screens outside of a visible output area. In
the following commit, this will be tracked and a warning is printed when
it happens. This makes the test fail.
2019-09-29 18:20:15 -04:00
Uli Schlachter 0bc22aea85 client shims: Remove some duplicate code
Both commit 44e6b2d24e and 4eda67ce54 added the same function to this
file (and by the commit message, the later was intended to do so, while
the former has an unrelated commit message (but does not contain any
other changes)).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-09-21 13:44:38 +02:00
Daniel Hahler dc98eade3b
naughty: fix extra newline with only title/message (#2870)
* tests/test-naughty-legacy.lua: s/counter/added_counter

* naughty: fix extra newline with only title/message

With only title or message it should not have an extra newline.

Fixes: https://github.com/awesomeWM/awesome/commit/423aeebe8#commitcomment-35062951
2019-09-19 02:11:18 +02:00
Daniel Hahler caf9a26660
tests: runner.run_steps: add fname/lnum for failed steps (#2877) 2019-09-14 14:35:20 +02:00
Daniel Hahler 13ea02eeeb
tests/run.sh: do not export XDG_CONFIG_HOME (#2876)
Only set it for the "awesome" process invocation.
2019-09-13 17:55:27 +02:00
Daniel Hahler 9b86a03b66
tests: do not export build_dir (#2875)
If really necessary this should be an uppercased var, but it is only
used with test-gravity.lua, where we can just rely on `$PWD` being the
build dir.
2019-09-13 17:55:06 +02:00
Daniel Hahler 4c31a0f745
tests: improve test-selection-transfer: use "wait_per_step" option (#2874)
* test-selection-transfer: clarify comment / condense

Noticed this via flaky coverage for the check after the "wait_a_bit"
block.

Ref: https://codecov.io/gh/awesomeWM/awesome/pull/2872/changes#L193

* tests/_runner.lua: add support for wait_per_step
2019-09-13 16:39:40 +02:00
Daniel Hahler a7674f2359
tests/run.sh: output "awesome --version" (#2872)
Might be good to have a short version of it (single line), but extra
lines are indented, so this seems to be OK.

This helps / shows when the built version is not up-to-date (e.g. after
git-bisect), and serves as a basic check that it can be run in the first
place.
2019-09-13 16:02:22 +02:00
Daniel Hahler 0cbf536269
test-naughty-legacy.lua: harden/cleanup (#2873) 2019-09-13 16:00:51 +02:00
Emmanuel Lepage Vallée f1335be21a
Merge pull request #2855 from Elv13/screen_geo_template
doc: Add some images to represent the various area of a screen.
2019-08-25 15:48:18 -04:00
Aire-One d97dccfa1f doc: Improve the screen padding image.
It now shows the padding instead of the tiling area.
2019-08-25 15:35:17 -04:00
Emmanuel Lepage Vallee 602d6ded07 doc: Add some images to represent the various area of a screen. 2019-08-19 01:48:00 -04:00
Emmanuel Lepage Vallee f0bf0df6f0 doc: Add an UML class diagram like table of cardinalities.
It will help users find how to get some objects from other objects.
2019-08-19 01:19:32 -04:00
Emmanuel Lepage Vallee c48b03ca9c doc: Help the examples with text but no images get generated more often.
In case of error, well, make an error, but update the content anyway.
This will be enough for the CI but makes development less painful.

Also update the cmake targets to re-generate them more often.
2019-08-19 00:24:14 -04:00
Emmanuel Lepage Vallee 6cb54db6c1 tests: Fix tag:clients() in the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 84a0ca56a2 tests: Implement dynamic properties for the client shims.
This way enough signal are sent to display clients modified by the
rules.
2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 9283719bfb tests: Implement the fake_* screen methods 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee f0b6e36ac1 tests: Implement mouse.screen properly 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee e8c1463ce3 tests: Compute root.size() cxorrectly 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 4eda67ce54 tests: Add the struts to the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 44e6b2d24e shims: Always return something for c:tags() 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee 48f973f2eb tests: Add awesome.xrdb_get_value to the shims 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee ef508462b8 shims: Add a better error message when mouse.screen is called too early. 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee d3a0dcffcd tests: Add client:kill() to the shims. 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee a18348542c shims: Enforce working on valid screen objects.
Previously it was possible to manipulate deleted screens and that
made debugging harder down the line. By catching this early, it
wont be as nightmarish.
2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee ce2dbea510 shims: Avoid a race condition when setting the mouse screen. 2019-08-18 02:44:34 -04:00
Emmanuel Lepage Vallee f7c0f419e9 shims: Fix indentation 2019-08-14 00:55:27 -04:00
Emmanuel Lepage Vallee 1617c894cc tests: Use rawget to avoid trigerring the tripwire.
The next commit will introduce extra checks that would otherwise
break this.
2019-08-14 00:55:27 -04:00
Emmanuel Lepage Vallée 1e59fc7fd2
Merge pull request #2828 from Elv13/matcher_v2
Improve `gears.matcher` to be more flexible.
2019-08-11 22:29:35 -07:00
Emmanuel Lepage Vallée ed0918385c
Merge pull request #2825 from Elv13/yet_more_notif_fixes
Support the notification spec v1.2
2019-08-10 12:47:09 -07:00
Emmanuel Lepage Vallée c4c97174e6
doc: Fix a rendering regression regarding backgrounds. (#2820)
The way background are rendered changed to accomodate issues regarding
cliping and border. However this broke the documentation examples.

This commit fixes this in the least hacky way I found.

Fixes #2727
2019-08-06 22:48:06 -07:00
Emmanuel Lepage Vallee 91ca922671 tests: Test the gears.matcher greater and lesser sections. 2019-08-03 18:26:06 -04:00
Emmanuel Lepage Vallee 2dc8c62b9b tests: Test gears.matcher "rule_every". 2019-08-03 18:26:06 -04:00
Emmanuel Lepage Vallee 774465df4d doc: Add the new grears.matcher features to the lone example.
This isn't really intended to be used outside of the object rules.
2019-08-03 18:26:06 -04:00
Emmanuel Lepage Vallee 6d58d7b4a2 tests: Test that the legacy naughty popup is used when the new API fails
Displaying errors is important. If the notification popup caused the
error, it was likely nothing could be displayed.
2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee 529f4be53e tests: Check that naughty emits "request::display_error" when needed. 2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee aed2af44b6 tests: Check if using client icon doesn't exceed the size constraints. 2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee 6761778830 tests: Test the notification icon theme request::icon support. 2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee 4fe05a566d tests: Test exposing the notification persistence and animation props 2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee 7d609fb69b tests: Test the notification spec v1.2 "resident notification" support.
If a notification is resident, invoking an action should not destroy it.
If an action is not resident, invoking an action destroys it.
2019-08-03 01:45:22 -04:00
Emmanuel Lepage Vallee e076bc664e naughty: Bump the SPEC version compliance to v1.2.
* action icons
 * persistence
 * residence
 * categories
 * animated icons
 * more ways to get icons

In addition, the commit also tries its best to attach notifications to
objects using various dubious semi compliant hints or the DBus PID. It
works often enough to be useful.
2019-08-03 01:45:22 -04:00
Sergey Vlasov f08599a6d6 test-leak-client.lua: Test GC for titlebar widgets (#2830)
Add a test which recreates the titlebar for an existing client and
checks that widgets from the old titlebar instance can be GC'd.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-22 17:35:18 +03:00
Emmanuel Lepage Vallée f3ee880bd8
Merge pull request #2816 from Elv13/more_notif_fix
Fix 4 "new API" notification bugs
2019-07-10 17:27:27 -04:00
Emmanuel Lepage Vallee aabbb412fe naughty.action: Fix icon_only.
It could not be specified in the contructor.

Fix #2815
2019-07-07 16:07:37 -04:00
Sergey Vlasov 51e823832c test-awful-placement: Test no_overlap with unselected tags (#2809)
Test the behavior of awful.placement.no_overlap when placing clients on
unselected tags.  Currently this tests only the most common case with
only a single selected tag and a single tag set for each client.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:43:30 +03:00
Sergey Vlasov c48d2e5a70 test-awful-placement: s/window/client/g
Use the "client" term consistently instead of using "client" in code and
"window" in comments.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov ec8edaf9d5 test-awful-placement: Test no_overlap with sticky clients
Clients which are sticky should be taken into account by
awful.placement.no_overlap even if they seem to be on a different tag;
add a test to verify this behavior.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov b6c7e6751a test-awful-placement: Test no_overlap with hidden and minimized clients
Clients which are hidden or minimized should be ignored by
awful.placement.no_overlap; add a test to verify this behavior.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov 1c27f9d227 test-awful-placement: Reindent after the previous change
Only whitespace changes and reformatting of comments.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:15 +03:00
Sergey Vlasov 9e894d8fdd test-awful-placement: Make the test repeatable
In order to test the behavior of awful.placement.no_overlap with
unselected tags, the test sequence must be able to run multiple times.
Fix the test code to make this possible (currently it just performs the
same sequence 3 times, the code to actually test the behavior with
different tags will be added later).

Indentation is unchanged to make the changes obvious in diff; the next
commit will contain formatting changes without anything else.

Signed-off-by: Sergey Vlasov <sigprof@gmail.com>
2019-07-04 16:42:05 +03:00
Uli Schlachter fe37eeb913 Fix index handling in a taglist example (#2810) 2019-07-03 16:54:42 -04:00
Emmanuel Lepage Vallee c97cb5c282 tests: Test the new naughty.widgets
This commit also add some "magic" comments to existing tests so they
render correctly. Note that some older commits predates these "magic"
comments, which is why they are not there.
2019-06-08 18:56:08 -04:00
Emmanuel Lepage Vallee b4ece0f053 doc: Use an explicit tag for all static functions.
This way their name doesn't get mangle by the broken magic. It will also
eventually allow to `error()` in the template when the implicit
`@function` is used.

This commit also fixes a large number of issues found while
proof-reading everything.
2019-06-08 18:14:13 -04:00
Michael Beaumont 9e2a544ba3 naughty: Add position "middle" to center notifications in screen (#2775)
Signed-off-by: Michael Beaumont <mjboamail@gmail.com>
2019-06-08 16:10:14 -04:00
worron 5fef354892 Fix instance existing check for application spawn (#2774)
User defined matcher now has higher priority while checking
existing instance for application spawn.
2019-06-08 16:09:37 -04:00
Hùng 755c44ca52 Slider new feature `bar_active_color` and examples
- Fill slider bar with a linear pattern based on current value (if `bar_active_color` and `bar_color` are correctly provided)
- Add examples for the apidoc
2019-04-23 23:13:32 -04:00