View previous topic :: View next topic |
Author |
Message |
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Mon Nov 18, 2013 9:57 pm Post subject: anyone using awesome WM? question with rc.lua |
|
|
I am trying to put the CPU information in the title bar with pop-up windows when the cursor is floating over it. I don't know the lua language, but I can understand somewhat what the code mean. I found some code like that as followed but it doesn't work
-- CPU usage widget
cpuwidget = awful.widget.graph()
cpuwidget:set_width(50)
cpuwidget:set_height(30)
cpuwidget:set_background_color("#494B4F")
cpuwidget:set_color("#FF5656")
cpuwidget_t = awful.tooltip({ objects = { cpuwidget.widget },})
-- Register CPU widget
vicious.register(cpuwidget, vicious.widgets.cpu,
function (widget, args)
cpuwidget_t:set_text("CPU Usage: " .. args[1] .. "%")
return args[1]
end)
it can show the graph correctly, but it can't show anything when I move the cursor above the graph. How could I fix it? Thanks
I am using awesome 3.5 |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Wed Nov 20, 2013 10:53 am Post subject: |
|
|
Just try and error for such things. Or try to learn a bit this language.
The scripts I tried in the past sometimes worked sometimes not, so basically adopt it.
And not sure if your processor lists the right values on the right place, yes tahts also a serious problem when the script is too outdated or from another distro. |
|
Back to top |
|
|
pd1986 Guru
Joined: 19 Feb 2012 Posts: 404 Location: Paris
|
Posted: Wed Nov 20, 2013 10:55 am Post subject: |
|
|
tw04l124 wrote: | Just try and error for such things. Or try to learn a bit this language.
The scripts I tried in the past sometimes worked sometimes not, so basically adopt it.
And not sure if your processor lists the right values on the right place, yes tahts also a serious problem when the script is too outdated or from another distro. |
Thanks. |
|
Back to top |
|
|
|