Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
anyone using awesome WM? question with rc.lua
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Mon Nov 18, 2013 9:57 pm    Post subject: anyone using awesome WM? question with rc.lua Reply with quote

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
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Wed Nov 20, 2013 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 404
Location: Paris

PostPosted: Wed Nov 20, 2013 10:55 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum