Created borderbox (markdown)

This commit is contained in:
Luke Bonham 2013-09-07 03:33:28 -07:00 committed by copycat-killer
parent 9989559ca4
commit 62acc707f6
1 changed files with 47 additions and 0 deletions

47
borderbox.md Normal file
View File

@ -0,0 +1,47 @@
Creates a thin wibox at a position relative to another wibox.
This allows to create "borders" for your wiboxes.
lain.widget.borderbox(relbox, s, args)
`relbox` and `s` (an integer being screen number) are required arguments, `args` is an optional table
which can contain:
Variable | Meaning | Type | Default
--- | --- | --- | ---
`position` | Position of the additional box | string | "above"
`color` | Color of the additional box | string | `#FFFFFF`
`size` | Size in pixels of the additional box | int | 1
Possible values for `.position`: `above`, `below`, `left` and `right`.
### Example usage
Think of this as a wibox:
[======================]
If `args.position = "above"`, then you'll get an additional wibox below
the existing one:
________________________
[======================]
It'll match position and size of the existing wibox.
If your main wiboxes are stored in a table called `mywibox` (one wibox
for each screen) and are located at the bottom of your screen, then this
adds a borderbox on top of them:
-- Layout section
for s = 1, screen.count() do
...
-- Most likely, you'll want to do this as well:
awful.screen.padding(screen[s], { bottom = 1 })
-- Create the box and place it above the existing box.
lain.widgets.borderbox(mywibox[s], s, { position = "above" } )
...
end