Skip to content

Instantly share code, notes, and snippets.

@Tucos
Created January 5, 2015 12:40
Show Gist options
  • Save Tucos/0c48e0f41eadb443e58c to your computer and use it in GitHub Desktop.
Save Tucos/0c48e0f41eadb443e58c to your computer and use it in GitHub Desktop.
own_window yes
own_window_type panel
alignment tl
minimum_size 500 500
lua_load dock.lua
lua_draw_hook_pre draw_pre
TEXT
$updates
require("cairo")
local function context()
if conky_window == nil then return nil end
local surface = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local context = cairo_create(surface)
return context
end
function conky_draw_hook_pre()
local c = context()
if c == nil then return end
cairo_set_source_rgb(c, 1, 0, 0)
cairo_rectangle(c, 10, 0, 20, 20)
cairo_fill(c)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment