| View previous topic :: View next topic |
| Author |
Message |
catch22 n00b

Joined: 18 Mar 2007 Posts: 17
|
Posted: Thu Nov 05, 2009 5:26 pm Post subject: conky + lua-cairo -> missing bindings |
|
|
Hi all!
I wanted to test the new lua cairo support in conky-1.7.2. So set the USE flags and remerged conky.
| Code: | $ equery u conky
* Searching for conky ...
[ Legend : U - flag is set in make.conf ]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for app-admin/conky-1.7.2-r2:
U I
+ + X : Adds support for X11
+ + alsa : Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
- - apcupsd : enable support for sys-power/apcupsd
- - audacious : enable monitoring of music played by media-sound/audacious
- - curl : Adds support for client-side URL transfer library
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
- - eve : enable support for the eve-online skill monitor
- - hddtemp : Enable monitoring of hdd temperature (app-admin/hddtemp)
+ + imlib : Adds support for imlib, an image loading and rendering library
- - iostats : enable support for per-task I/O statistics
+ + lua : enable if you want Lua scripting support
+ + lua-cairo : enable if you want Lua Cairo bindings for Conky (also anables lua support)
+ + lua-imlib : enable if you want Lua Imlib2 bindings for Conky (also enables lua and imlib support)
- - math : enable support for glibc's libm math library
- - moc : enable monitoring of music played by media-sound/moc
- - mpd : enable monitoring of music controlled by media-sound/mpd
+ + nano-syntax : enable syntax highlighting for app-editors/nano
+ + nvidia : enable reading of nvidia card temperature sensors via media-video/nvidia-settings
- + portmon : enable support for tcp (ip4) port monitoring
- - rss : Enables support for RSS feeds
- - thinkpad : enable support for IBM/Lenovo notebooks
+ + truetype : Adds support for FreeType and/or FreeType2 fonts
- - vim-syntax : Pulls in related vim syntax scripts
- - weather-metar : enable support for metar weather service
- - weather-xoap : enable support for metar and xoap weather service
+ + wifi : Enable wireless network functions |
That produced:
| Code: | $ conky -v
Conky 1.7.2 compiled Sun Oct 25 13:06:21 CET 2009 for Linux 2.6.30-gentoo-r5 (i686)
Compiled in features:
System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky
X11:
* Xdamage extension
* XDBE (double buffer extension)
* Xft
Music detection:
General:
* portmon
* wireless
* nvidia
* config-output
* Imlib2
* ALSA mixer support
* Lua
Lua bindings:
* Cairo
* Imlib2
|
For testing I created a fairly simple lua script:
| cairo_test.lua: | -- Conky Lua scripting example
--
require 'cairo'
do
function conky_cairo_test()
io.write("create surface\n")
if conky_window == nil then
io.write(string.format("window: got nil\n"))
return
end
local w = conky_window.width
local h = conky_window.height
io.write(string.format("window: %s, %s\n",w,h))
local dr = conky_window.drawable
local ds = conky_window.display
local v = conky_window.display
local cs = cairo_xlib_surface_create(ds, dr, v, w, h)
cr = cairo_create(cs)
end
end
|
My conkyrc is also very basic:
| .conkrc.cairo: | lua_load ~/cairo_test.lua
lua_draw_hook_pre cairo_test
TEXT
$nodename $sysname $kernel on $machine |
Then I run conky by typing:
| Code: | | $ conky -c .conkyrc.cairo |
And I get:
| Code: | Conky: desktop window (140003c) is subwindow of root window (23d)
Conky: drawing to desktop window
Conky: drawing to single buffer
create surface
window: got nil
create surface
window: got nil
create surface
window: 1920, 1200
Conky: llua_do_call: function conky_cairo_test execution failed: /home/users/mad/cairo_test.lua:22: attempt to call global 'cairo_xlib_surface_create' (a nil value)
create surface
window: 1920, 1200
Conky: llua_do_call: function conky_cairo_test execution failed: /home/users/mad/cairo_test.lua:22: attempt to call global 'cairo_xlib_surface_create' (a nil value)
[...]
|
That looks like the cairo bindings are missing. But how do I fix this? |
|
| Back to top |
|
 |
catch22 n00b

Joined: 18 Mar 2007 Posts: 17
|
Posted: Thu Nov 05, 2009 11:11 pm Post subject: |
|
|
Ok, I can reproduce that behavior on a different machine (now amd64, the other one was x86).
Did _anyone_ get that cairo stuff working?
Btw.: Lua without cairo runs quit well..... |
|
| Back to top |
|
 |
keenblade Veteran


Joined: 03 Oct 2004 Posts: 1038
|
Posted: Thu Jan 07, 2010 6:28 pm Post subject: |
|
|
| catch22 wrote: | ...Did _anyone_ get that cairo stuff working?
|
I wonder that, too. I could not get that pretty conky graphic example here.
Can anybody share working config and lua scripts using cairo for conky. _________________ Anyway it's all the same at the end...
Need help to get it working: "x-fi surround 5.1" |
|
| Back to top |
|
 |
|
|
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
|
|