This is a follow-up to 052cda939b. Expressions like 's.index == 2'
and 's == screen.primary' might work at first. However, they are not
"dynamic": If screens are added/removed or the primary screen changes,
then the widgets are not updated to follow this.
Instead, the example now uses the new awful.widget.only_on_screen
container which provides the needed dynamic behaviour.
This is arguably "the real fix" to #1562 and #1565.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The default config had tables like mywibox and mywibox[s] was the wibox
that is visible on screen s. When a screen is removed, nothing cleans up
these tables and so the screen and the wibox could not be garbage
collected. The same applies to the layoutbox, taglist etc.
This commit removes the global mywibox table and instead saves it as a
property on the screen. This way, the screen is not explicitly
referenced and when it is removed, the screen, its wibox and all of its
widgets become unreachable and can be garbage collected.
This commit also updates the docs and the tests that referenced things
(mostly the wibox) via mywibox[s] to now use s.mywibox.
Fixes: https://github.com/awesomeWM/awesome/issues/1125
Signed-off-by: Uli Schlachter <psychon@znc.in>
This system allow containers, widgets and layouts to be listed in
the documentation with an example screenshot.
It uses raw HTML due to ldoc limitations, but as it is autogenerated,
it wont be user visible.
Instead of copying images to ${BUILD_DIR}/docs/images, which is the directory
with the input to ldoc, this now copies the images to ${BUILD_DIR}/doc/images,
which is where ldoc generates its output. That way, the images are together with
the html files and are automatically picked up by a lot of stuff.
Fixes: https://github.com/awesomeWM/awesome/issues/681
Signed-off-by: Uli Schlachter <psychon@znc.in>