massive update, probably broken
[dotfiles/.git] / .config / awesome / lain / wiki / mem.md
1 ## Usage
2
3 [Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage)
4
5 ### Description
6
7 Shows memory status in MiB, [like `top` and `free -h`](https://github.com/lcpz/lain/issues/271).
8
9 ```lua
10 local mymem = lain.widget.mem()
11 ```
12
13 ## Input table
14
15 Variable | Meaning | Type | Default
16 --- | --- | --- | ---
17 `timeout` | Refresh timeout (in seconds) | integer | 2
18 `settings` | User settings | function | empty function
19
20 in `settings` you can use the following variables:
21
22 Variable | Meaning | Type
23 --- | --- | ---
24 `mem_now.used` | Memory used (MiB) | string
25 `mem_now.swapused` | Swap memory used (MiB) | string
26 `mem_now.perc` | Memory percentage | int
27
28 ## Output table
29
30 Variable | Meaning | Type
31 --- | --- | ---
32 `widget` | The widget | `wibox.widget.textbox`
33 `update` | Update `widget` | function