Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ive got pretty standard vicious net widget for the eth0, yet this is my laptop and I move a lot, sometimes I use wlan0, sometimes ppp0. Is there a way in vicious to dynamically choose the active iface?

netwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(netwidget,, '<span color="'
.. beautiful.fg_netdn_widget ..'">${eth0 down_kb}</span> <span color="'
.. beautiful.fg_netup_widget ..'">${eth0 up_kb}</span>', 3)
share|improve this question

Make use of the ${ carrier} variable to determine which interface is up between eth0, wlan0 or ppp0, then return data of that interface. Do all of this in a format function.

Everything you need is in the README.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.