Created
January 5, 2015 12:40
-
-
Save Tucos/0c48e0f41eadb443e58c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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