lain/net.md

18 lines
627 B
Markdown
Raw Normal View History

2013-09-07 14:33:41 +02:00
[<- widgets](https://github.com/copycat-killer/lain/wiki/Widgets)
2013-09-07 13:55:46 +02:00
Monitors network interfaces and shows current traffic in a textbox.
mynet = lain.widgets.net()
2013-09-10 23:55:52 +02:00
### input table
2013-09-07 13:55:46 +02:00
Variable | Meaning | Type | Default
--- | --- | --- | ---
2013-09-10 23:55:52 +02:00
`timeout` | Refresh timeout seconds | int | 2
2013-09-07 13:55:46 +02:00
`iface` | Network device | string | autodetected
`units` | Units | int | 1024 (kilobytes)
2013-09-10 23:55:52 +02:00
`settings` | User settings | function | empty function
2013-09-07 13:55:46 +02:00
2013-09-10 23:55:52 +02:00
Possible other values for `units` are 1 (byte) or multiple of 1024: 1024^2 (mb), 1024^3 (gb), ... .
2013-09-07 13:55:46 +02:00
2013-09-10 23:55:52 +02:00
`settings` can use the following `iface` strings: `carrier`, `state`, `sent`, `received`.