My configuration files for Debian/Ubuntu applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mem.md 977 B

123456789101112131415161718192021222324252627282930313233343536
  1. ## Usage
  2. [Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage)
  3. ### Description
  4. Shows memory status in MiB, [like `top` and `free -h`](https://github.com/lcpz/lain/issues/271).
  5. ```lua
  6. local mymem = lain.widget.mem()
  7. ```
  8. ## Input table
  9. Variable | Meaning | Type | Default
  10. --- | --- | --- | ---
  11. `timeout` | Refresh timeout (in seconds) | integer | 2
  12. `settings` | User settings | function | empty function
  13. `widget` | Widget to render | function | `wibox.widget.textbox`
  14. in `settings` you can use the following variables:
  15. Variable | Meaning | Type
  16. --- | --- | ---
  17. `mem_now.used` | Memory used (MiB) | string
  18. `mem_now.swapused` | Swap memory used (MiB) | string
  19. `mem_now.perc` | Memory percentage | int
  20. (See line 23-39 of [this file](https://github.com/lcpz/lain/blob/master/widget/mem.lua) for more potential variables.)
  21. ## Output table
  22. Variable | Meaning | Type
  23. --- | --- | ---
  24. `widget` | The widget | `wibox.widget.textbox`
  25. `update` | Update `widget` | function