| 1 |
Loadavg Widget |
| 2 |
============== |
| 3 |
|
| 4 |
This widget provides the loadavg date as a text box. |
| 5 |
|
| 6 |
For details on the numbers, may read: |
| 7 |
http://www.teamquest.com/resources/gunther/display/5/index.htm |
| 8 |
|
| 9 |
|
| 10 |
Settings Available (with default values): |
| 11 |
----------------------------------------- |
| 12 |
|
| 13 |
- set_shorttimer(5): Sets the update interval of the widget. (Fast than each 5 |
| 14 |
seconds may makes no sense since the data itself does not update more |
| 15 |
quickly in /prov/loadavg |
| 16 |
|
| 17 |
- set_command("xterm -e htop"): Set what command to issue on Button1 press. |
| 18 |
|
| 19 |
- set_prefix(""): Sets some text before the loadavg info. May use 'Pango Text |
| 20 |
Markup': http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html |
| 21 |
|
| 22 |
- set_suffix(""): Sets the text after the loadavg info. |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
Implementation: |
| 27 |
--------------- |
| 28 |
|
| 29 |
To use it, include it into your rc.lua by inserting this line: |
| 30 |
|
| 31 |
```lua |
| 32 |
local loadavg = require("obvious.loadavg") |
| 33 |
``` |
| 34 |
|
| 35 |
Then may configure it like this: |
| 36 |
|
| 37 |
```lua |
| 38 |
loadavg.set_shorttimer(10) |
| 39 |
loadavg.set_command("urxvt -e htop") |
| 40 |
loadavg.set_prefix('<span foreground="#cccccc" font_size="x-large">') |
| 41 |
loadavg.set_suffix("</span>") |
| 42 |
``` |