lain/cpu.md

17 lines
648 B
Markdown
Raw Normal View History

2013-09-07 14:34:51 +02:00
[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
2013-09-07 14:12:13 +02:00
Shows in a textbox the average CPU usage percent for a given amount of time.
2013-09-07 12:28:21 +02:00
mycpuusage = lain.widgets.cpu()
The function takes a table as optional argument, which can contain:
Variable | Meaning | Type | Default
--- | --- | --- | ---
`refresh_timeout` | Refresh timeout seconds | int | 10
2013-09-08 18:51:51 +02:00
`header` | Text to show before value | string | " Cpu "
2013-09-07 12:28:21 +02:00
`header_color` | Header color | string | `beautiful.fg_normal` or "#FFFFFF"
`color` | Value color | string | `beautiful.fg_focus` or "#FFFFFF"
2013-09-08 18:52:01 +02:00
`footer` | Text to add after value | string | "% "
2013-09-07 12:28:21 +02:00
**Note**: `footer` color is `color`.