Emmanuel Lepage Vallee
4bd90f0f35
doc: Add documentation linting and fix all issues it found.
2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee
f3987f43b6
doc: More proof reading fixes.
2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee
f8f11a23f5
doc: Add some @see to the shape doc.
...
The `transform` function was unclear.
2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee
f6f57e7ba0
gears.color: Add a function to apply the alpha to a color.
...
Some code in awesome concatenate color strings. This means it blows
up when the pattern are used instead of color, with this, it fails
gracefully (by returning the unmodified pattern).
2022-08-29 22:48:36 -07:00
Emmanuel Lepage Vallee
18468d32dd
widget: Fix saving a widget to a file.
...
Previously, if `beautiful.fg_normal` wasn't black, it would not render
correctly.
2022-08-29 22:48:36 -07:00
Emmanuel Lepage Vallee
91fe314e0b
gears.color: Fix color serialization.
...
Some widgets like the tasklist serialize the theme colors to use them
in Pango markup. If the theme color were already converted to pattern,
that blew up. With this fix, pattern can be converted back into strings
correctly.
2022-08-29 22:48:36 -07:00
Emmanuel Lepage Vallee
75019c3f6f
Implement fixes for Luacheck 0.26.1
...
* Rename or mute parameters starting with _
* Replace `not (>=)` with `<`
2022-08-28 16:59:14 -07:00
Pepijn Krijnsen
53b70b4585
Update documentation for gears.color.parse_color(col) method
...
Lua comments now accurately describe the return values of this method.
Added a more comprehensive example, too. Issue #3555
2022-02-12 21:04:21 +00:00
SystematicError
86b6c49a0f
Fix typo ( #3562 )
...
Co-authored-by: SystematicError <systematicerror@users.noreply.github.com>
2022-02-07 11:08:08 -08:00
Emmanuel Lepage Vallée
1413f0c4b9
Merge pull request #3513 from necauqua/fix-timer
...
Signalled error: bad argument #3 to 'timeout_add' (number has no integer representation)
2021-12-22 12:52:07 -08:00
Lucas Schwiderski
e55d1d41f3
docs(g.timer): Fix typo
2021-12-21 10:46:43 +01:00
Lucas Schwiderski
b343cb8111
docs(g.timer): Improve wording
2021-12-21 09:09:09 +01:00
Anton Bulakh
71d08ab6ec
Use gmath.round
2021-11-23 08:45:52 +02:00
Anton Bulakh
e64446082b
Fix timer errors
2021-11-22 12:24:20 +02:00
Emmanuel Lepage Vallee
9db62b824c
gears.matcher: Add `fallback` rules.
...
Right now, all rules are additive, they are squashed into one big
array of properties. This is normally fine, but sometime you want
explicit rules for some objects, but also default rules if nothing
matches.
While this can be expressed in the current system by overriding
*all* properties, this require more effort than having "special"
and "fallback" rules.
2021-10-22 22:26:12 -07:00
Emmanuel Lepage Vallee
005c2d61a0
gears.matcher: Fix `rule_every`.
...
It really didn't do the right thing and didn't work anyway.
2021-10-22 22:26:12 -07:00
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