Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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 a wibox:

 -- Create the wibox
 mywibox[s] = awful.wibox({
         fg = beautiful.fg_normal, bg = beautiful.bg_normal,
         border_color = beautiful.border_focus,
         --border_width = beautiful.border_width,
         position = "top",
         --height = 20,
         screen = s
         })

[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:

 -- Add widgets to the wibox - order matters
 mywibox[s].widgets = {
     {
         mylauncher,
         mytaglist[s], spacer,
         mylayoutbox[s],
         layout = awful.widget.layout.horizontal.leftright
     },
     mytextclock, separator,
     volwidget, volicon, separator,
     mailinfo, mailicon, separator,
     s == 1 and mysystray or nil,
     separator, upicon, netwidget, dnicon,
     -- mytasklist[s],
     layout = awful.widget.layout.horizontal.rightleft
 }

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.

share|improve this answer
    
Thanks for this. Note that the default rc.lua wibox construction line on my machine (13.10) is: mywibox[s] = awful.wibox({ position = "top", screen = s }) –  Drew Noakes Mar 28 at 14:10
    
Could you please share your definition of separator? –  Drew Noakes Mar 28 at 14:15

Your Answer

 
discard

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.