diff --git a/tests/examples/shims/beautiful.lua b/tests/examples/shims/beautiful.lua index 26349e97b..85115ede5 100644 --- a/tests/examples/shims/beautiful.lua +++ b/tests/examples/shims/beautiful.lua @@ -1,5 +1,29 @@ local lgi = require("lgi") local Pango = lgi.Pango +local cairo = lgi.cairo + +-- A simple Awesome logo +local function logo() + local img = cairo.ImageSurface.create(cairo.Format.ARGB32, 22, 22) + local cr = cairo.Context(img) + + -- Awesome default #555555 + cr:set_source_rgb(0.21568627451, 0.21568627451, 0.21568627451) + cr:paint() + + cr:set_source_rgb(1,1,1) + + cr:rectangle(0, 7, 15, 1) + cr:fill() + + cr:rectangle(15, 15, 1, 7) + cr:fill() + + cr:rectangle(8, 15, 7, 1) + cr:fill() + + return img +end -- Default theme for the documentation examples local module = { @@ -10,7 +34,9 @@ local module = { border_width = 1.5 , -- Fake resources handling - xresources = require("beautiful.xresources") + xresources = require("beautiful.xresources"), + + awesome_icon = logo() } local f = Pango.FontDescription.from_string("sans 8")