tasklist: Add default colors for broken themes

In case loading the theme failed and we don't have fg_normal or bg_normal, add
default values for these properties. All the other colors are only used if they
are defined, but these two always need to be defined.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2013-11-18 15:19:54 +01:00
parent 6a669a8775
commit 15f0881966
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ tasklist.filter = {}
local function tasklist_label(c, args) local function tasklist_label(c, args)
if not args then args = {} end if not args then args = {} end
local theme = beautiful.get() local theme = beautiful.get()
local fg_normal = args.fg_normal or theme.tasklist_fg_normal or theme.fg_normal local fg_normal = args.fg_normal or theme.tasklist_fg_normal or theme.fg_normal or "#ffffff"
local bg_normal = args.bg_normal or theme.tasklist_bg_normal or theme.bg_normal local bg_normal = args.bg_normal or theme.tasklist_bg_normal or theme.bg_normal or "#000000"
local fg_focus = args.fg_focus or theme.tasklist_fg_focus or theme.fg_focus local fg_focus = args.fg_focus or theme.tasklist_fg_focus or theme.fg_focus
local bg_focus = args.bg_focus or theme.tasklist_bg_focus or theme.bg_focus local bg_focus = args.bg_focus or theme.tasklist_bg_focus or theme.bg_focus
local fg_urgent = args.fg_urgent or theme.tasklist_fg_urgent or theme.fg_urgent local fg_urgent = args.fg_urgent or theme.tasklist_fg_urgent or theme.fg_urgent