Commit Graph

442 Commits

Author SHA1 Message Date
Stardust-kyun 67f5e7feca
Adding zoom-fill (#3917) 2024-08-20 18:28:20 +00:00
Cyan903 ad0290bc1a
docs: Fix widget.wibox.slider example (#3923) 2024-06-06 01:23:54 -07:00
Emmanuel Lepage Vallée 8b1f8958b4
Merge pull request #3746 from Elv13/grid_border
Modernize the `wibox.layout.grid` module and add border support.
2024-03-23 22:50:03 -07:00
Emmanuel Lepage Vallée e6f5c79808
Merge pull request #3879 from Elv13/2023_xmas_commits_pr1
Fix the documentation warnings
2024-01-20 16:34:06 -08:00
Emmanuel Lepage Vallée 2eab55e536 Update lib/wibox/container/border.lua
Co-authored-by: Aire-One <aireone@aireone.xyz>
2023-12-31 15:27:21 -08:00
Emmanuel Lepage Vallee 1291a346f3 doc: Add more `wibox.container.background` examples. 2023-12-31 15:27:21 -08:00
Emmanuel Lepage Vallee 57b766ccf9 tests: Test the border container. 2023-12-31 14:54:44 -08:00
Emmanuel Lepage Vallee 47855e4164 tests: Test the 3 new imagebox extents. 2023-12-31 14:54:44 -08:00
Emmanuel Lepage Vallee eddb83fb72 calendar: Add a border width property. 2023-12-31 00:57:07 -08:00
Emmanuel Lepage Vallee de7f3bfe90 grid: Remove an outdated example `print`. 2023-12-31 00:57:07 -08:00
Emmanuel Lepage Vallee 956bd96e94 grid: Apply Awesome v4.2 naming conventions.
* Stop using top level properties for vertical/horizontal
* No abbreviations
* Use height/width instead of size
* Don't use methods where properties can be used
2023-12-31 00:57:07 -08:00
Emmanuel Lepage Vallee f8f5e2c69b grid: Add border support.
This is long overdue. A bit of historical context. The grid API
is losely somewhat based on the old `radical` module, but was
heavily improved by @getzze. That version had row_span and col_span.

This made the way the previous implementation coded the border
incompatible. I spent some time back then trying to bolt it back on,
but the complexity is quite high and never made it work right.

This commit goes in another direction. Rather than draw the border,
it creates a mask where the border should *not* be, then bucket fill
the widget. This is the equivalent of CSS `border-collapse`.

It also support custom borders. This allows dashed lines and partial
borders.

The main use case will be to add border support to the calendar. It
was previously possible to partially do it using custom cell painters,
but was pretty hacky. Now that the calendar will deprecate the custom
painters in favor of `widget_template`s, a more robust alternative was
required.

The drawback of this commit is obviously the added complexity to the
most complex layout. This is why it adds many tests to cover the various
corner cases.
2023-12-31 00:57:07 -08:00
Emmanuel Lepage Vallee 2d5c4b64c5 grid: Add the ability to specify the properties inline.
This is already used in the `wibox.layout.manual` layout. It makes
the widget easier to use. Previously, using the imperative syntax
was necessary for most grids.
2023-12-31 00:56:24 -08:00
Emmanuel Lepage Vallee 3beb2187fa tests: The `grid` layout has no `padding` property.
Looks like a rebase leftover from an earlier iteration of the code.
2023-12-31 00:56:24 -08:00
Emmanuel Lepage Vallee b5a5f7c575 shims: Make sure properties defined in `awful/client.lua` are called.
Previously, it would raw_set properties like floating. This means the
signals and the result of calling `awful.client.property.get` was
different. Some older code uses `awful.client.property.get` or
`awful.client.object.get_floating` rather than `c.floating`.

With this change, all native properties should be handled as so
and all non native properties set at the end, after `__newindex`
is defined.

The list of properties was extracted using

    cat client.c
        | tail -n100
        | grep -Eo '["][^"]+["]'
        | grep -Eo '[^"]+'
2023-12-30 14:21:13 -08:00
Emmanuel Lepage Vallee 477a75b6b8 shims: Add "urgent" colors. 2023-12-30 14:21:13 -08:00
Emmanuel Lepage Vallee d1c9f59259 cmake: Support splitted documentation examples templates.
They can now use multiple files. Some of the templates are getting
unmaintainable and would benefit from being multiple small widgets.
2023-12-30 14:21:13 -08:00
frankfut b6263bf209
Fix typo in example wibox.widget.textbox file (#3795)
In tests/examples/wibox/widget/textbox/line_spacing.lua, there is a typo
It's supposed to be "has", but it's "shas", this is obviously not a grammar issue, so it's a typo.
2023-04-23 00:28:45 -07:00
Emmanuel Lepage Vallee 9207b78f81 doc: Add `awful.screenshot` examples. 2022-11-13 17:35:32 -08:00
Emmanuel Lepage Vallee 6a862f786b doc: Add support for `awfu.screenshot` in the `awful` template. 2022-11-13 17:35:32 -08:00
Emmanuel Lepage Vallee fc9b06787b shims: Implement the titlebar size API properly.
Needed for the screenshot API.
2022-11-13 17:35:32 -08:00
Emmanuel Lepage Vallée 26032bf018
shape: Add a "solid shadow" shape. (#3489)
This is an useful client shape to get "client side solid shadows".
2022-10-16 02:29:09 -07:00
Lucas Schwiderski 963622af8e
fix: Use user-provided Lua binary to run scripts (#3715) 2022-10-10 22:42:33 -07:00
Emmanuel Lepage Vallee 88c65a71dd textbox: Rename `align` to `halign`.
`halign` is used in multiple place in the API. Once upon a time,
Awesome only supported horizontal widgets, but this era has long
passed.

Fix #3640
2022-09-06 16:11:04 -07:00
Emmanuel Lepage Vallee b16505733a tests: Add more textbox tests. 2022-09-06 16:09:26 -07:00
Emmanuel Lepage Vallee 328551d479 doc: Fix the UML template luacheck issues 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee fc95f43bde doc: Add logging to _postprocess.lua.
Try to find why it works locally, but not on GitHub.
2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 0f948c145f tests: Fix a missing --DOC_HIDE in the notification examples. 2022-08-29 22:49:46 -07:00
Emmanuel Lepage Vallee 7091b2720c test: Enforce the maximum size for the `wibox` test example templte.
So far, it worked fine if both `w`/`h` were enforced or neither.
If one was, then there was a chance one axis would end up 9999
pixel wide or tall. This worked fine when the `.svg` was inserted
using `<img>`, but now that it's using `<object>`, it now scales
down to zero.
2022-08-29 22:49:46 -07:00
Emmanuel Lepage Vallee 86d1b1c22c doc: Add a mandatory `@noreturn` for functions and methods.
The goal is to catch cases where the return value exists, but is
forgotten. There was a large enough number of them to turn this
into a real check. Initially, I just wanted to implement it to fix
the problems, then delete the code. But since this is so common, I
think it is worth the annoyance.
2022-08-29 22:49:45 -07:00
Emmanuel Lepage Vallee 3510d96d6c doc: Find and post-process untracked SVG files.
Right now the UML template write many files which were not tracked
by CMake. This caused them to be missing from the doc since the
post-processing was added.
2022-08-29 22:49:03 -07:00
Emmanuel Lepage Vallee b4c989bcf8 doc: Fix some regression introduced when fixing the shims behavior.
Previously, clients were displayed even when they were not tagged
or minimized. This was fixed in the shims. However, some examples
never created tags, so the client were never tagged, thus no longer
displayed.
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
Aire-One e15205a548 add(css) .image-object max-size (#17)
Co-authored-by: Emmanuel Lepage Vallée <elv1313@gmail.com>
2022-08-29 22:48:54 -07:00
Lucas Schwiderski 20ab3a5fb6 doc: Fix example code header showing in page 2022-08-29 22:48:54 -07:00
Lucas Schwiderski 345de1e9d9 bug: Add workaround for new image paths 2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee 87a69c4d4d doc: Fix a problem which causes the SVG to be blurry. 2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee 93f7269081 doc: Change the default theme to use a "special" fg color.
This magic color will be find&replaced by a post-processing script.
2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee f5b2f34269 doc: Update some examples not to hardcode the foreground color. 2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee 2c18547a6b doc: Post-process all auto-generated SVG.
This removes the hardcoded foreground color and inherit it from
the browser and/or CSS stylesheet.

This commit only support the foreground colors, future changes could
extend it to support all standard colors.
2022-08-29 22:48:54 -07:00
Emmanuel Lepage Vallee 197ed41c2d doc: Use the theme foreground color instead of black in the templates.
This is a step toward adding a dark theme to the doc. Otherwise, the
images were black on dark grey, which is impossible to read.
2022-08-29 22:48:36 -07:00
Emmanuel Lepage Vallee 8f71ef6dff doc: Document the tasklist widget. 2022-08-29 22:48:35 -07:00
Emmanuel Lepage Vallee cf2129b2fe doc: Add a memento widget for the wibox template. 2022-08-29 22:47:55 -07:00
Emmanuel Lepage Vallee 686c4fec22 doc: Add the ability to render random widgets to the sequence template. 2022-08-29 22:47:55 -07:00
Aire-One 392dbc21ab
[CI] Run `Run examples tests` on every supported Lua Version (#3575)
* ci(main) always run `Run examples tests`

* fix(font1) print with string.format
2022-03-06 14:04:50 +01:00
Lucas Schwiderski 5ac0829f5d
docs(w.w.slider): Add value signal to initial example
Since the primary use case of the slider widget is to do something
with the value when it changes, the initial example should show
how to do that.
2021-12-21 11:55:36 +01:00
sarubo 8d61790be7 doc: Add the markup example of popup_calendar
Refer to tests/examples/awful/widget/calendar_popup/default.lua
2021-11-21 23:49:46 +09:00
Emmanuel Lepage Vallée 2eb035e125
Merge pull request #3493 from Elv13/progressbar_doc
Improve the progressbar doc with more examples.
2021-11-03 12:40:56 -07:00
Emmanuel Lepage Vallee 76704b33e7 progressbar: Make `ticks` and `bar_shape` compatible with each other.
It looked horrible/buggy when combined. Now it looks like people would
expect it to work. Another problem was the `bar_border_width` look
when `ticks` was `true.
2021-11-02 20:36:07 -07:00
Emmanuel Lepage Vallee 0afb719f82 doc: Improve the progressbar doc.
Another commit in the "lets finish the widget doc" serie.
2021-11-02 20:36:07 -07:00