You are not logged in.

#1 2013-08-27 16:49:48

z1lt0id
Member
Registered: 2012-09-20
Posts: 177

SOLVED - [lua] [awesomewm] vicious scripting

I'm trying to get vicious.thermal to round off the temperature from the k10temp.  Unfortunately my code doesn't seem to be outputting anything.  Here it is below


coretempwidget = wibox.widget.textbox()
 vicious.register(coretempwidget, vicious.widgets.thermal,
    function (widget, args)
      return string.format(" $1 C", math.floor(args[1] + 0.5))
     end,
     19,
     {"../../module/k10temp/drivers/pci:k10temp/0000:00:18.3", "core", "temp1_input"})

Clearly I'm doing something wrong with the syntax.  But I can't seem to figure it out.

Any ideas?

EDIT: I realised that the string.format was incorrect.  - Changed it to %d instead $1 and it resolved the issue.

Last edited by z1lt0id (2013-08-27 17:54:47)

Offline

Board footer

Powered by FluxBB