You are not logged in.
Pages: 1
Topic closed
*final edit + solution*
The example in the link is flawed and due to my inexperience with Lua I tried debugging it the wrong way and thus failed to realize that other scripts would work. The crux lay in my failure to grasp that the Cairo bindings are built into conky and that I could not use "require 'cairo'" within the Lua interpreter as though it were an installed module. I eventually got the airclock from this page to work.
*edit*
I had misunderstood the problem before and have cleaned up the post to make it clearer.
*edit 2*
I've tried using conky-git in case this was an error in conky, but it still fails (which doesn't rule out a conky error, but it makes it less likely).
I wanted to play around with Lua and Conky so I installed conky-lua from the AUR. The simple non-cairo examples work but when I try to import cairo with
require 'cairo'
while following this example, I get the following output in the terminal and (obviously) no cairo graphics:
Conky: llua_load: ./cairo.lua:3: loop or previous error loading module 'cairo'
Conky: desktop window (121) is root window
Conky: drawing to desktop window
Conky: drawing to single buffer
Conky: llua_do_call: function conky_cairo_test execution failed: attempt to call a nil value
I can import 'cairo' in the Lua interpreter by running the following lines, so it seems that the installation was successful:
package.cpath = package.cpath .. ';/usr/lib/conky/lib?.so'
require 'cairo'
The output of "conky -v" confirms this:
Lua bindings:
* Cairo
* Imlib2
So what am I missing? My experience with Lua is limited to the 20 minutes that I spent reading through the "tutorial directory".
Last edited by Xyne (2010-03-03 04:00:00)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
The name of module is oocairo, then you must require it with:
require "oocairo"
:-)
Offline
Thanks renato_garcia, but that doesn't solve the problem. All of the tutorials use "cairo" and it seems that lua-oocairo is not the package that I need. Changing that line to "oocairo" does not let the script run.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
There apparently are two different lua-cairo bindings on luaforge.net, maybe you could try the other one?
Offline
That's probably it, thanks. I was assuming that there would already be a package for it because I think I've seen conky+lua+cairo used somewhere around here before.
I'll bump the thread once I get around to packaging that.
Last edited by Xyne (2010-03-03 01:40:09)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
The second project does provide "cairo" but it doesn't work. The project also appears to be old and dead so I doubt that's what you're supposed to use.
Built in Lua bindings for Cairo and Imlib2, which allows you to draw directly to Conky's window using Cairo and/or Imlib2.
I take that to mean that conky-lua should provide the necessary bindings. Maybe it's a configuration options. I'll keep looking but I'm still hoping that someone has already got this working.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I bump this thread.
I have EXACTLY the same problem. Did you solve this issue?
Offline
eXpander,
Read the title of this thread. Then read the posts starting with the first one.
Closing.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Pages: 1
Topic closed