]> git.madduck.net Git - etc/awesome.git/blob - borderbox.md

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Updated Index (markdown)
[etc/awesome.git] / borderbox.md
1 Creates a thin wibox at a position relative to another wibox.
2
3 This allows to create "borders" for your wiboxes.
4
5         lain.widget.borderbox(relbox, s, args)
6
7 `relbox` and `s` (an integer being screen number) are required arguments, `args` is an optional table
8 which can contain:
9
10 Variable | Meaning | Type | Default
11 --- | --- | --- | ---
12 `position` | Position of the additional box | string | "above"
13 `color` | Color of the additional box | string | `#FFFFFF`
14 `size` | Size in pixels of the additional box | int | 1
15
16 Possible values for `.position`: `above`, `below`, `left` and `right`.
17
18 ### Example usage
19
20 Think of this as a wibox:
21
22         [======================]
23
24 If `args.position = "above"`, then you'll get an additional wibox below
25 the existing one:
26
27         ________________________
28         [======================]
29
30 It'll match position and size of the existing wibox.
31
32 If your main wiboxes are stored in a table called `mywibox` (one wibox
33 for each screen) and are located at the bottom of your screen, then this
34 adds a borderbox on top of them:
35
36     -- Layout section
37         for s = 1, screen.count() do
38         ...
39
40             -- Most likely, you'll want to do this as well:
41             awful.screen.padding(screen[s], { bottom = 1 })
42
43             -- Create the box and place it above the existing box.
44             lain.widgets.borderbox(mywibox[s], s, { position = "above" } )
45
46         ...
47         end