Skip to content
Browse files

allow to set interface by user in netgraphs

  • Loading branch information...
1 parent 91e098a commit 63d8bc5f8b03eac31b1b6ce51fbacc6ef3f4f23c @dodo committed Dec 26, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 widget/netgraphs.lua
View
6 widget/netgraphs.lua
@@ -136,9 +136,11 @@ function new(args)
local labels = {}
ret.switch = function () end
+ ret.toggle = function () end
if args.small then
- ret.switch = function ()
- cur = network_interfaces[interface_cache[cur] %
+ ret.toggle = function () ret.switch() end
+ ret.switch = function (newcur)
+ cur = newcur or network_interfaces[interface_cache[cur] %
#network_interfaces + 1]
small:reset()
small:add(small_layout[cur])

0 comments on commit 63d8bc5

Please sign in to comment.
Something went wrong with that request. Please try again.