Вот патч к конфигурации по умолчанию, который заставляет заголовки иметь фон из файла. Файл масштабируется до точного размера заголовка.
diff --git a/awesomerc.lua b/awesomerc.lua
index fa584b8a8..3e3a54c0d 100644
--- a/awesomerc.lua
+++ b/awesomerc.lua
@@ -542,6 +542,14 @@ client.connect_signal("manage", function (c)
end
end)
+local tb_bg_image = gears.surface("/tmp/variant_outside.png")
+local bg_width, bg_height = gears.surface.get_size(tb_bg_image)
+local function bg_image_function(_, cr, width, height)
+ cr:scale(width / bg_width, height / bg_height)
+ cr:set_source_surface(tb_bg_image)
+ cr:paint()
+end
+
-- @DOC_TITLEBARS@
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
@@ -557,7 +565,8 @@ client.connect_signal("request::titlebars", function(c)
end)
)
- awful.titlebar(c) : setup {
+ local args = { bgimage_normal = bg_image_function, bgimage_focus = bg_image_function }
+ awful.titlebar(c, args) : setup {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,