Commit Graph

3859 Commits

Author SHA1 Message Date
Emmanuel Lepage Vallee 07590962e5 template: Rename to `wibox.template`.
It was previously `wibox.widget.template`, but was in fact a container.

Now it is a top level concept. The next few commits will integrate it deeper
into AwesomeWM.
2022-11-13 15:59:01 -08:00
Emmanuel Lepage Vallee 3765efaccc wibox.template: Remove the `args` in favor of passing the template directly.
It didn't do much and I wanted to make the syntax a drop-in replacement
of `wibox.widget {}`.
2022-10-23 19:04:28 -07:00
Emmanuel Lepage Vallee 67b2b26683 template: Bring to feature parity with the awful.widget.common implementation.
`awful.widget.common` has the ability to set "roles" and apply properties
to the entire widget tree. This was missing from the previous commit.
2022-10-23 19:04:28 -07:00
Aire-One a7932b127f add(w.w.template) template can't be a callback
Containers and layouts don't allow to build a widget from a callback, so
there is no reason to have this feature here.
2022-10-22 15:44:35 -07:00
Aire-One 2dab6c336c add(w.w.template) set_template check widget 2022-10-22 15:44:35 -07:00
Aire-One 2542c3b04a add(w.w.template) constructor accepts widget props 2022-10-22 15:44:35 -07:00
Aire-One 8803878e1f doc(w.w.template) 3rd party lib usage example 2022-10-22 15:44:34 -07:00
Aire-One bfe4832c63 doc(w.w.template) current methods 2022-10-22 15:44:34 -07:00
Aire-One 45a458a2b7 doc(w.w.template) module description 2022-10-22 15:44:34 -07:00
Aire-One aaec225545 fix(w.w.template) free queued_updates array
This is a small cleanup to not keep in memory a value we don't need.

After the update_callback callback is called, we don't need to remember
it happens this callback was  queued before. (It also prevents a
possible memory leak (of a boolean value) when widgets are destroyed)
2022-10-22 15:44:34 -07:00
Aire-One cd5dda385e fix(w.w.template) draw
The draw method exists only for widgets. When dealing with more complex
widget, this method is not necessary implemented (i.e. with layouts).

We need to check the method is defined by the child before calling it.
2022-10-22 15:44:34 -07:00
Aire-One f12bb57c66 fix(w.w.template) fit and layout methods
The previous implementation for these methods was a naive attempt at
making the base widget working. We need to make sure computing the
widget's sizes is more robust for complex widget_template definition.
2022-10-22 15:44:34 -07:00
Aire-One 33d5de52c6 add(w.w.template) constructor `buttons` param 2022-10-22 15:44:34 -07:00
Aire-One 086eb146f6 add(w.w.template) implement widget as child 2022-10-22 15:44:34 -07:00
Aire-One e7db5e3049 fix: format 2022-10-22 15:44:34 -07:00
Aire-One f4088ca4e1 fix: rename parameter 2022-10-22 15:44:34 -07:00
Aire-One b824d99c05 fix(update_args) move to _private property
Suggested by @sclu1034
2022-10-22 15:44:34 -07:00
Aire-One 2f2beb69cb add: natural management of update arguments 2022-10-22 15:44:34 -07:00
Aire-One a005967191 fix: variable declaration
Suggested by @sclu1034
2022-10-22 15:44:34 -07:00
Aire-One d5dbb9d32e add(update_callback) allow nil callback
Suggested by @sclu1034
2022-10-22 15:44:34 -07:00
Aire-One 08109a6d60 add(w.w.template) template widget 2022-10-22 15:44:34 -07:00
Lily a436478731
fix floating snap (#3719)
makes snap & aerosnap respect padding & workarea, adds snapper_gap padding to build_placement subcalls using args
2022-10-22 14:38:52 -07: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
David Kosorin b16f628620
Restore minimized sticky clients (#3709) 2022-09-29 23:12:13 -07:00
Aire-One db5ade48e4 doc(awful.titlebar): fix ldoc WARN 2022-09-18 18:22:52 +02:00
Aire-One 941bb72fa2 doc(awful.keygrabber): fix ldoc WARN 2022-09-18 18:22:02 +02:00
Actionless Loveless bde785ee64
fix(ruled: client: matching_rules): regression after 75019c3f6f (#3694) 2022-09-15 23:44:48 -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 d7f6410e09 textbox: Add 3 properties.
The textbox API reflects the Pango layout API circa 2011, time to
bring this to 2022. This adds:

 * indent
 * justify
 * line_spacing_factor

It doesn't add `spacing` because it doesn't seem to do anything.
It also doesn't add the `is_*` methods to know if the text wraps
or ellipsize. We could, but nobody asked for them. The line spacing
is a feature request from Posix on Discord.
2022-09-06 16:09:26 -07:00
Tonda Fischer c8d4f878a0
#3539: Make tool tips indicate the action that a click will acheive (#3657)
* #3539: Make tool tips indicate the action that a click will achieve.
2022-09-03 15:31:24 -07:00
Emmanuel Lepage Vallee 82a5fb6030 doc: Do not document the 16bit max widget size.
As pointed out by @aire-one, it does not provide much value.
2022-08-29 22:54:09 -07:00
Emmanuel Lepage Vallee 3c0d5b606f doc: Fix issues found by @aire-one. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee a18b40e12b wibox.widget.textclock: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1eda8cdf93 wibox.widget.textbox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 642fa3b66b wibox.widget.systray: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 5367513609 wibox.widget.slider: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 79496e9acc wibox.widget.separator: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee f9f04866b8 wibox.widget.progressbar: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee e63d867523 wibox.widget.piechart: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 95cd45942a wibox.widget.imagebox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 8e16dc4412 wibox.widget.graph: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee ff9c89d005 wibox.widget.checkbox: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1b726985de wibox.widget.calendar: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1259c3ccc6 wibox.widget.base: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 926f0ff22f wibox.layout.stack: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee d05fc5dc8f wibox.layout.ratio: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee c963b16f90 wibox.layout.grid: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 13b792e42e wibox.layout.flex: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 285a8b23ff wibox.layout.fixed: Update the property documentation. 2022-08-29 22:49:47 -07:00
Emmanuel Lepage Vallee 1fa30c3195 wibox.layout.align: Update the property documentation. 2022-08-29 22:49:47 -07:00