$OpenBSD: patch-lib_awful_widget_tasklist_lua_in,v 1.3 2014/01/14 13:33:37 dcoppa Exp $

commit 15f088196699857cdac28250d7a3857fe8b57cee
Author: Uli Schlachter <psychon@znc.in>
Date:   Mon Nov 18 15:19:54 2013 +0100

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>

--- lib/awful/widget/tasklist.lua.in.orig	Tue Jan 14 10:19:49 2014
+++ lib/awful/widget/tasklist.lua.in	Tue Jan 14 10:20:30 2014
@@ -27,8 +27,8 @@ tasklist.filter = {}
 local function tasklist_label(c, args)
     if not args then args = {} end
     local theme = beautiful.get()
-    local fg_normal = args.fg_normal or theme.tasklist_fg_normal or theme.fg_normal
-    local bg_normal = args.bg_normal or theme.tasklist_bg_normal or theme.bg_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 or "#000000"
     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 fg_urgent = args.fg_urgent or theme.tasklist_fg_urgent or theme.fg_urgent
