I do exactly what it says in the vicious README, but when I reload the configuration file, no widgets are added to the top bar. So for example, I add:
require("vicious")
at the top (after moving the vicious directory in ~/.config/awesome/) and:
-- Initialize widget
cpuwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(cpuwidget, vicious.widgets.cpu, "$1%")
later in the config file. I reload the configuration file, and nothing changes.
What am I doing wrong?
You've created and registered the widget, but you've not actually told Awesome where to put the widget. You might assume it should know you want it in the default "panel", but actually you can put it in other places (like if you set up a second panel at the bottom).
In the default
rc.lua
(and yours hopefully, if it's not been too customized), there should be a part that says something about creating awibox
:[Note there is an 's' variable due to that portion being in a 'for' loop. Same for the next code block below. ] Then you add the widgets you've defined to the wibox as follows:
These are not all vicious widgets but some default ones and ones I've defined. I have one set of widgets starting from the left edge of the screen and another starting from the right edge. My tasklist used to be in the middle of the panel but I've commented it out, since now I put a tasklist on a bottom panel and use
conky
in the middle of the top panel.