titlebar: add support for a custom widget

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Cedric GESTES 2009-09-03 19:37:59 +02:00 committed by Julien Danjou
parent 1df4f1c66c
commit ae6d09edc1
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,7 @@ function add(c, args)
if not args then args = {} end
if not args.height then args.height = capi.awesome.font_height * 1.5 end
local theme = beautiful.get()
if not args.widget then customwidget = {} else customwidget = args.widget end
-- Store colors
data[c] = {}
data[c].fg = args.fg or theme.titlebar_fg_normal or theme.fg_normal
@ -115,6 +116,7 @@ function add(c, args)
tb.widgets = {
widget_list,
customwidget,
{
appicon = appicon,
title = title,