Network widget caching.

This commit is contained in:
Kolan Sh 2012-10-06 05:49:57 +04:00
parent 60a9b7c240
commit 4d9e8a262d
1 changed files with 5 additions and 4 deletions

9
rc.lua
View File

@ -162,10 +162,11 @@ mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
vol_icon = widget({ type = "imagebox" })
vol_icon.image = image(beautiful.widget_vol)
vicious.register(wifi_widget_down, vicious.widgets.net, '<span color="#7F9F7F">${wlan0 down_kb}</span>', 3)
vicious.register(wifi_widget_up, vicious.widgets.net, '<span color="#CC9393">${wlan0 up_kb}</span>', 3)
vicious.register(wired_widget_down, vicious.widgets.net, '<span color="#7F9F7F">${eth0 down_kb}</span>', 3)
vicious.register(wired_widget_up, vicious.widgets.net, '<span color="#CC9393">${eth0 up_kb}</span>', 3)
vicious.cache(vicious.widgets.net)
vicious.register(wifi_widget_down, vicious.widgets.net, '<span color="#7F9F7F">${wlan0 down_mb}</span>', 2)
vicious.register(wifi_widget_up, vicious.widgets.net, '<span color="#CC9393">${wlan0 up_mb}</span>', 2)
vicious.register(wired_widget_down, vicious.widgets.net, '<span color="#7F9F7F">${eth0 down_mb}</span>', 2)
vicious.register(wired_widget_up, vicious.widgets.net, '<span color="#CC9393">${eth0 up_mb}</span>', 2)
vicious.register(bat_widget, vicious.widgets.bat, "$2%", 120, "BAT0")
vicious.register(cpu_widget, vicious.widgets.cpu, "$1%")
vicious.register(mem_widget, vicious.widgets.mem, "$1%")