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.

cpu.md 747 B

12345678910111213141516171819202122232425262728293031
  1. ## Usage
  2. [Read here.](https://github.com/lcpz/lain/wiki/Widgets#usage)
  3. ### Description
  4. Shows the current CPU usage, both in general and per core.
  5. ```lua
  6. local mycpu = lain.widget.cpu()
  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. `settings` can use these strings:
  15. * `cpu_now.usage`, the general use percentage;
  16. * `cpu_now[i].usage`, the i-th core use percentage, with `i` starting from 1.
  17. ## Output table
  18. Variable | Meaning | Type
  19. --- | --- | ---
  20. `widget` | The widget | `wibox.widget.textbox`
  21. `update` | Update `widget` | function