titlebar: add support for a custom widget
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
1df4f1c66c
commit
ae6d09edc1
|
@ -63,6 +63,7 @@ function add(c, args)
|
||||||
if not args then args = {} end
|
if not args then args = {} end
|
||||||
if not args.height then args.height = capi.awesome.font_height * 1.5 end
|
if not args.height then args.height = capi.awesome.font_height * 1.5 end
|
||||||
local theme = beautiful.get()
|
local theme = beautiful.get()
|
||||||
|
if not args.widget then customwidget = {} else customwidget = args.widget end
|
||||||
-- Store colors
|
-- Store colors
|
||||||
data[c] = {}
|
data[c] = {}
|
||||||
data[c].fg = args.fg or theme.titlebar_fg_normal or theme.fg_normal
|
data[c].fg = args.fg or theme.titlebar_fg_normal or theme.fg_normal
|
||||||
|
@ -115,6 +116,7 @@ function add(c, args)
|
||||||
|
|
||||||
tb.widgets = {
|
tb.widgets = {
|
||||||
widget_list,
|
widget_list,
|
||||||
|
customwidget,
|
||||||
{
|
{
|
||||||
appicon = appicon,
|
appicon = appicon,
|
||||||
title = title,
|
title = title,
|
||||||
|
|
Loading…
Reference in New Issue