Commit Graph

10515 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 4a0645e942 doc: Correctly render --DOC_NO_USAGE + --DOC_GEN_OUTPUT.
It was previously merged into a single block.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 1ff860454e theme: Use a SVG wallpaper for the xresources theme.
It uses a stylesheet for the colors. This is not "as good" as the
old one because it only supports 16:9 aspect ratio. However, the
old wallpaper function doesn't fit great in the new model. The
widget doesn't know the screen, so it cannot pass it to a function.
It's possible to stretch the wallpaper.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee bbf1c9270f tests: Test the imagebox DPI and CSS stylesheet. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee d8bc791818 imagebox: Add DPI and CSS Stylesheet properties for SVG images.
This exposes the `librsvg` DPI and Stylesheet properties. This
is a groundwork commit to port the xresources theme to use a SVG
wallpaper instead of hardcoded Cairo code to generate the colorfar
logo.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 883cdb7f41 doc: Fix the rendering of double quotes and semicolons
CMake uses quotes and semicolon in its internal list datatype.

Previously, all double quotes were converted to single quotes to
avoid this problem. Semicolors were interpreted as newlines in
ldoc.

With this commit, both of them render fine. This was required
because a new example uses CSS and XML where those symbols have
a specific meanning.
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee ddccddb6dc imagebox: Allow to load SVG data without saving it. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 3f2db184ad gears.wallpaper: Deprecate. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee e55ea2b0d5 doc: Support multiple screens in the "default look" template. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 6b7ecc51f8 tests: Add awful.wallpaper tests 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 580f16b7ff tests: Draw the wallpaper in the awful template 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee dcdc6a1089 shims: Add awesome._get_key_name 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 8481af90c5 shims: Add a wallpaper setter. 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee b9971a5acc root: Do not end up in an infinite loop if the wallpaper is `nil`.
If `root.wallpaper` was called with `nil` during initialization,
AwesomeWM would get into an infinite restart loop.
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 82f54ab95c rc.lua: Switch to awful.wallpaper 2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee 98dd78b777 awful: Add a wallpaper module.
`gears.wallpaper` is a flat API (that doesn't even belong in gears) and
is neither well integrated with the other AwesomeWM concepts, nor well
documented or easy to understand for newcomers.

This module adds an object oriented, declarative, module with properties
for the most common wallpaper types. It also integrates with
`awful.placement` and the `wibox` module.

The design attempts to make the wallpaper a "wibox like" object like
the titlebars. It is non-interactive, but still allows the widgets. Note
that this is slow and should be avoided for dynamic content. It is why
the widgets are never updated unless manually reloaded. The objects also
attempt to be disposable rather than persistent. Thus they are immutable
by default to prevent accidental abuse.

Fix #3428 #2596
2021-09-24 08:42:42 -07:00
Emmanuel Lepage Vallee aa998db626 tests: Test the imagebox upscale and downscale properties. 2021-09-24 08:38:13 -07:00
Emmanuel Lepage Vallee 5212f0634a imagebox: Add a `downscale` and `upscale` property.
Previously, it was really hard to get the image to do one *or* the
other. The `resize` property set both at the same time.

While it could, this does not deprecate the old `resize` property
since 99% of the user wan't to lock both.
2021-09-24 08:38:13 -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
Emmanuel Lepage Vallée eddabebac4
Merge pull request #3436 from Elv13/fix_3428
Fix setting the screen in a notification preset.
2021-09-24 07:53:54 -07:00
Emmanuel Lepage Vallee 64d190546d core: Always add a search path when `-c` is passed to the cli.
This way modular config load with just `-c` and don't require the
extra `-s`.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee b038463e22 naughty.legacy: Handle broken configs betters.
If a config with naughty.layouts.box crashes at startup and the
fallback config uses naughty.layouts.legaxy, it is possible their
will be some lookup for an object which isn't tracked by the legacy
module.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 24fc1043ee tests: Remove a flackyness in test-input-binding 2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee ccbe116877 tests: Try to mitigate a flacky test with luajit 5.1.
Give more attempt for the wibars to be GCed. This test fails ~5% of
the time since moving from Travis CI to GitHub actions.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee bd8f2f936b naughty: Fix a memory leak related to suspended notifications. 2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 552b2a22d1 tests: Test the notification presets.
Make sure they behave the same in legacy and ruled modes.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 9336b62f80 ruled.notification: Handle legacy presets.
This is deprecated, but some modules like `lain` use them, so it
must still minimally work for backward compatibility.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee e752943b98 notification: Correctly handle `screen` set in the presets.
It was setting directly to `_private`, which both didn't work
and caused a memory leak.

Fix #3428
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 21a111d154 naughty: Allow to set the message from the presets again.
This was never really supported and is really not what the presets
were event meant to be used for. But it worked and `lain` used it.
2021-09-22 19:17:02 -07:00
Emmanuel Lepage Vallee 89c84caee4 naughty.legacy: Explicitly remove the screen.
Do not rely on the GC. It isn't reliable with Luajit.
2021-09-22 13:39:58 -07:00
poisson-aerohead 87e09f81ab
Correction of error message in awful.keygrabber.run_with_keybindings (#3445)
Two calls to gdebug.print_warning() in run_with_keybindings use an
argument that concatenates a fixed string with the result returned by a
call to gdebug.dump(). gdebug.dump() is the debug library function for
immediate printing. It has no return value. This causes the correct
message in print_warning to not be printed, and also causes a
naughty.notify box to appear warning of an attempt to concatenate to an
empty variable.

The call to gdebug.print_warning should have an argument made by
concatenating to gdebug.dump_return(). Incidentally, this is in fact the
function used internally by gdebug.print().

Signed off by: Brian Sobulefsky <brian.sobulefsky@protonmail.com>
2021-09-21 08:34:46 -07:00
Emmanuel Lepage Vallée 5ca16ae8a0
Merge pull request #3364 from Aire-One/fix/awful.key-constructor
[doc] awful.key contructor and general improvements
2021-09-20 11:39:41 -07:00
martin f. krafft abac464384
Replace /usr/bin/which with command -v (#3439)
The `which` utility is being phased out since POSIX has mandated
`command -v` for the same task, so let's use that in the awesome-client
script.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2021-09-20 10:21:43 -07:00
Emmanuel Lepage Vallée d9bfc9c37e
Merge pull request #3442 from sclu1034/feature/github_actions
Fix "test previous commit" workflow task with only one commit
2021-09-19 22:17:11 -07:00
Emmanuel Lepage Vallée c3a508a886
Merge pull request #3386 from Elv13/awful_wibar
Fix some wibar bugs, polish the API a bit and add some doc.
2021-09-19 13:05:11 -07:00
Lucas Schwiderski 4b6d7fd241
bug(github_actions): Fix logging failed commits
Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-09-19 15:11:26 +02:00
Lucas Schwiderski c12715e11f
bug(github_actions): Skip testing single previous commit
Due to the default of executing bash with `-e -o pipefail` this didn't
fail gracefully anymore. But an explicit check makes more sense anyways.
2021-09-19 15:02:46 +02:00
Emmanuel Lepage Vallée edf21742b8
Merge pull request #3438 from Elv13/fix_3384
Fix 3384
2021-09-17 13:10:58 -07:00
Emmanuel Lepage Vallee e27b908ca0 doc: Document the naughty.action "invoked" signal. 2021-09-16 17:25:46 -07:00
Emmanuel Lepage Vallee 17bd5fb036 naughty: Pass the notification object to the action "invoked" signal.
Fix #3384
2021-09-16 17:22:33 -07:00
Emmanuel Lepage Vallée 73e908ed95 Apply suggestions from code review
Co-authored-by: Lucas Schwiderski <4508454+sclu1034@users.noreply.github.com>
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallée 6ad693eff0 Apply suggestions from code review
Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee d5d74e44de doc: Document the wibar module. 2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee b2368c54a8 tests: Fix the `screen` template rendering with multiple screens.
It only worked for a single screen. It still isn't perfect, but
much better than it was.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee dd6163ffe6 shims: Fix the screen workarea value.
It didn't work with multiple screens.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee a94a4beb6f doc: Add a missing DOC_HIDE which damaged the rendering. 2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee b883855272 wibar: Allow to configure how conflicts between wibars are resolved.
Previously, the horizontal wibars would always get priority. Now,
this can be configured.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 529a6c2a8d wibar: Expose update_workarea.
It is now possible to create wibars which are not changing the
tiled area.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 0828c20a55 rc.lua: Be consistent about how the wibar is created.
The syntax was a leftover from ancient time where the wibar
constructor could not forward the properties to the wibox and
when the wibox didn't take a `widget` argument.

I make this change mostly to be consistent with the documentation
examples.
2021-09-12 01:59:48 -07:00
Emmanuel Lepage Vallee 67dc363437 wibar: Modernize the module structure.
Move the burdensome legacy code into local function so the normal
`gears.table.crush` module setup can be used. This fixes a couple
monior issues where `args` would be ignored.

This also makes a minor change to the logic. Changing the position
always moves to wibar to the end of the stack. Previously, there
was a minor case where it would not. There was also the case when
setting the same position twice would move the wibar, which was a bug.
2021-09-12 01:59:48 -07:00