Does nobody know the answer or is my question just too uninteresting?
Am 21.10.2012 03:34, schrieb [email protected]:
Hi!
I'm currently trying to write widgets for displaying cpu-usage for
each core. I was able to implement progressbars this way, however, I'm
not able to use textboxes. I was following the instructions on
https://gitorious.org/bashets/pages/Brief_Introduction:
|mywidget = wibox.widget.textbox()|
|||
|||However, this fails:
/etc/xdg/awesome/rc.lua:30: attempt to index field 'widget' (a nil value)
On http://awesome.naquadah.org/wiki/Widgets_in_awesome I found the
initialization:
mytextbox = widget({ type = "textbox" })
This actually works - however, using bashets, the widget won't be
displayed. I registered it the same way, as I did with the progressbar:
cpu1_txt = widget({ type = "textbox", name = "cpu1_txt"})
bashets.register("getcpuusage.pl", {widget = cpu1_txt, format =
"CPU1:$1%", update_time = 1})
cpu1_bar = awful.widget.progressbar()
cpu1_bar:set_max_value(100)
cpu1_bar:set_width(8)
cpu1_bar:set_height(20)
cpu1_bar:set_color('#FF6565')
cpu1_bar:set_vertical(true)
bashets.register("getcpuusage.pl", {widget = cpu1_bar, format = "$1",
update_time = 1})
.
.
.
.
.
.
.
mywibox[s].widgets = {
{
mylauncher,
mytaglist[s],
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
datewidget,
memwidget.widget,
memtext,
cpu1_bar.widget,
cpu1_txt,
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
Only the (properly working) progress bar is visible though. There were
no compiler messages.
So.. does anybody know, which way is the correct one to initialize
textboxes? I read, that |wibox.widget.textbox()was the new way since
3.4, but it is not working?
Does anyone have an idea, how to display the textbox using Bashets?
Regards and thanks for your time,
Ulrik S.
|
||