Merge pull request #1624 from psychon/doc_fix
Use only_on_screen widget in docs
This commit is contained in:
commit
17051d0520
|
@ -41,8 +41,16 @@ configurable rules.
|
||||||
Code:
|
Code:
|
||||||
|
|
||||||
s.mywibox : setup {
|
s.mywibox : setup {
|
||||||
s == screen.primary and my_first_widget, -- Only display on primary screen
|
{
|
||||||
s.index == 2 and my_second_widget, -- Only display on screen 2
|
layout = awful.widget.only_on_screen,
|
||||||
|
screen = "primary", -- Only display on primary screen
|
||||||
|
my_first_widget,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
layout = awful.widget.only_on_screen,
|
||||||
|
screen = 2, -- Only display on screen 2
|
||||||
|
my_second_widget,
|
||||||
|
},
|
||||||
my_third_widget, -- Displayed on all screens
|
my_third_widget, -- Displayed on all screens
|
||||||
{ -- Add a background color/pattern for my_fourth_widget
|
{ -- Add a background color/pattern for my_fourth_widget
|
||||||
my_fourth_widget,
|
my_fourth_widget,
|
||||||
|
@ -53,10 +61,8 @@ Code:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
In this example `s == screen.primary` is an inline expression. In the default
|
This examples uses the `awful.widget.only_on_screen` container to display
|
||||||
`rc.lua`, there is an `s` variable represent to define the current screen. Any
|
widgets only on some screens.
|
||||||
Lua logic expression can be used as long as it returns a valid widget or a
|
|
||||||
declarative layout, or `nil`.
|
|
||||||
|
|
||||||
### Composite widgets
|
### Composite widgets
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue