Commit Graph

325 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 3f2db184ad gears.wallpaper: Deprecate. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee b0a2d82d8f compat: Do not require to pass pattern._native to the wallpaper.
It makes the shims impossible to implement without a double free,
a memory leak or a crash. Using `capi` should not require to
destroy the LGI wrappers.

Another example, not fixed in this commit, are the client shapes.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee cefd4f843e gears.filesystem: Improve get_random_file_from_dir.
Previously, only a filename was returned. Getting the path was
inconvinient when used within a declarative construct.

It was also misbehaving then the directory didn't exist. Finally,
the extention list now accept extension names starting with a dot.
2021-09-24 08:38:13 -07:00
Lucas Schwiderski dc0d5df4da
doc: Implement review suggetions
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-06-20 12:25:11 +02:00
Lucas Schwiderski 3cefcfffe3
doc(g.timer): Improve documentation for helpers
Clarifies behaviour for the convenience constructor functions.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:29 +02:00
Lucas Schwiderski 33b2fdfbf6
doc: Fix typos
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:28 +02:00
Lucas Schwiderski 16df93370f
doc(g.table): Improve documentation
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-17 15:37:27 +02:00
Lucas Schwiderski 1182552783
bug(a.keygrabber): Stop timer when stopping keygrabber
When stopping a keygrabber with a timeout manually or through the stop
key, the timer would continue and call the stop callback again some time
later.

The error message in `gears.timer:stop` is removed, since there actually
is no harm in just returning immediately. And the timer implementation
itself calls `:stop` in certain places without checking for `.started`,
which lead to a situation where the internal call to `stop` triggered
the error message.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-06-11 08:59:58 +02:00
Aire-One 3a6fa10754 doc(@supermodule): gears.object inheritable doc 2021-04-02 19:24:07 +02:00
mergify[bot] 7a8fa9d27a
Merge pull request #3294 from sclu1034/feature/count_keys
Add utility to count table keys
2021-04-01 07:42:25 +00:00
Lucas Schwiderski f68939bfc1
chore(g.table): Add missing modeline 2021-03-31 08:29:00 +02:00
Lucas Schwiderski ec3788bf73
docs(g.table): Improve parameter descriptions 2021-03-31 08:27:08 +02:00
Yauhen Kirylau 6ef3a8f059
fix(gears: colors: recolor_image): always duplicate the surface (#3233) 2021-03-27 23:48:48 -07:00
Lucas Schwiderski e7d55567a6
Remove redundant assignment
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-27 14:08:47 +01:00
Lucas Schwiderski afced71a9a
Add example for gears.table.count_keys
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-22 20:55:40 +01:00
Lucas Schwiderski 058190a3c0
Add missing modelines
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-22 20:24:56 +01:00
Lucas Schwiderski 07df24f7d0
Add utility to count table keys
See #3293.

Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-03-22 20:24:55 +01:00
Daniel Hahler dab84c2662
fix(doc): gears.table.keys: s/integer keys/integer/ (#3293) 2021-03-22 12:05:17 -07:00
Lucas Schwiderski ca066e8d0f
Respect line column limit 2021-03-07 11:09:45 +01:00
Lucas Schwiderski a8d830f1e6
Improve gears.shape module description.
Fixes #3270.
2021-03-06 17:10:20 +01:00
Grumph f6a2306d1a Protect endswith and startswith from nil str
A nil parameter can mean an empty string (e.g. client.name), so we
just return false.
2021-01-26 17:58:25 +01:00
Emmanuel Lepage Vallée ae7d36f816
Merge pull request #3071 from actionless/fix-empty-string-matcher
fix(gears: matcher: default_matcher): handle sidecase of string.match-ing the empty string ('')
2020-05-04 01:44:15 -07:00
hung fdee02cdcf gears.shape: new shape (partial) squircle 2020-05-02 17:04:36 +07:00
hung 730b0f5c5c gears.math: add the sign function 2020-05-01 15:17:14 +07:00
actionless f803347fc8 fixup! fix(gears: matcher: default_matcher): handle sidecase of string.match-ing the empty string ('')
style: return true/false instead of assigning nil to result
2020-04-22 01:52:41 +02:00
actionless 90aacbc5b5 fix(gears: matcher: default_matcher): handle sidecase of string.match-ing the empty string ('') 2020-04-21 19:51:11 +02:00
hung 33f99fea1c Remove double blank line 2020-03-28 21:13:53 +07:00
hung 7f7793378e Use cr:save and cr:restore instead 2020-03-28 20:43:07 +07:00
hung 4eff88679c new shape: star 2020-03-28 20:21:39 +07:00
Emmanuel Lepage Vallee 625b9c8901 object: Add a private API to optimize chain of responsibilities.
Currently, emit_signal always call all connected function. However,
it is very wasteful for some I/O intensive operations like icon
lookup. This commit adds a trick (private API) to stop once
a condition is met.

It will also in the future be used for the permission system, but
this is not yet implementd.
2020-03-15 04:08:06 -04: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 Vallee d60c9ed0dd gears.geometry: Add a `rectangle.is_inside` function. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee 9d6ce1d298 doc: Fix gears.geometry doc. 2020-02-10 04:13:17 -05:00
Emmanuel Lepage Vallee e0b982fa1a gears.debug: Use the API level as the source of truth.
Rather than the version.
2020-02-08 17:18:01 -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
Yauhen Kirylau 37aa23be86 fix(gears: string: split): support more delimiters (#2962) 2020-01-19 19:04:28 -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 da8daa8dfc debug: Allow "deprecated_in" for class deprecation. 2020-01-19 01:55:51 -05:00
Seth Barberee b9bb9cbe69 add docs for gears.cache 2020-01-05 20:58:36 -06:00
Emmanuel Lepage-Vallee 9f42f57a76 doc: Upgrade the gears.timer documentation to the new standards. 2019-12-21 21:35:12 -08: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 Vallée a6e52a8c42
doc: Fix an incorrect signal name. (#2943)
Reported by @unai-ndz

See #1373
2019-12-11 10:01:54 -08:00
Emmanuel Lepage Vallee c96487515f object: Make the legacy accessor code more robust.
* Using `= one and two or three` is a bad idea on boolean.
* Using # to check if a table has content doesn't work on named keys
2019-12-04 02:05:09 -05:00
Emmanuel Lepage Vallee 42dceb1db8 object: Add a standard implementation for append and remove.
This is for legacy accessors only, but it will be expanded later.
2019-12-04 01:40:32 -05:00
Emmanuel Lepage Vallee fbe2b34af4 properties: Allow to delay some operations.
This will be useful for the append/remove support.
2019-12-04 01:40:32 -05:00
Aire-One 82a2769e04 Fix ldoc modules summaries missing the final `.`. 2019-11-28 13:53:59 +01: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 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