You are not logged in.

#1 2008-12-24 01:56:47

axion419
Member
Registered: 2007-04-12
Posts: 185

Lua -How to turn awesome/wicked widget to display 4 cores instead of 1

I am running awesome 3.1, and I copied a config from the wiki and it looks great, I just wanted to tweak the status bar to show all 4 of my cores instead of just one.  Here are the relevant portions of the config.

-- graphics cpu widget
cpugraphwidget = widget({ type = 'graph', name = 'cpugraphwidget', align = 'right' })
--cpugraphwidget.height = 0.85
cpugraphwidget.height = 0.95
cpugraphwidget.width = 40
cpugraphwidget.bg = '#000022'
cpugraphwidget.border_color = '#0a0a0a'
cpugraphwidget.grow = 'left'
cpugraphwidget:plot_properties_set('cpu', { fg = '#60ff60', fg_center = '#50e050', fg_end = '#40d040', vertical_gradient = false })
wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')
    mywibox[s].widgets    = {
--                                    mylauncher,
                           mytaglist[s],
--                           mytasklist[s],
                           mypromptbox[s],
                                    mpdwidget,
                                    myinfo,
                                    cpugraphwidget,
--                           mytextbox,
                                    s == 1 and mysystray or nil,
                                    datewidget,
                           mylayoutbox[s],
                                }
    mywibox[s].screen = s
end

I think I need to mess with the "wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')" part and add 2, 3 and 4.  I could be completely wrong though and that could display the total of all 4 of my cores workload.  Any help would be great.

Offline

#2 2008-12-24 04:22:44

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Lua -How to turn awesome/wicked widget to display 4 cores instead of 1

Replace '$1' with '$2 $3 $4 $5'. '$2 $3' works for my dual core, but I am using a text widget, not a bar.
Anyway 'man wicked' explains that $1 is for all the cores, $2 for the first core, $3 for the second and so on.


Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB