doc: Document how to select different shapes based on the content.

This commit is contained in:
Emmanuel Lepage Vallee 2019-03-04 17:06:42 -05:00
parent 9acc452b1e
commit fded165e41
1 changed files with 10 additions and 0 deletions

View File

@ -161,7 +161,17 @@ local notification = {}
-- @see gears.color -- @see gears.color
--- Widget shape. --- Widget shape.
--
-- Note that when using a custom `request::display` handler or `naughty.rules`,
-- choosing between multiple shapes depending on the content can be done using
-- expressions like:
--
-- -- The notification object is called `n`
-- shape = #n.actions > 0 and
-- gears.shape.rounded_rect or gears.shape.rounded_bar,
--
--@DOC_naughty_shape_EXAMPLE@ --@DOC_naughty_shape_EXAMPLE@
--
-- @property shape -- @property shape
-- @param gears.shape -- @param gears.shape