diff --git a/lib/awful.lua.in b/lib/awful.lua.in index 059c444d3..8e465177a 100644 --- a/lib/awful.lua.in +++ b/lib/awful.lua.in @@ -1282,6 +1282,8 @@ end -- bg_urgent The background color for urgent tags. -- fg_urgent The foreground color for urgent tags. -- taglist_squares Optional: set "true" or nil to display the taglist squares. +-- taglist_squares_sel Optional: an user provided image for selected squares. +-- taglist_squares_unsel Optional: an user provided image for unselected squares. -- @return A string to print. function widget.taglist.label.all(t, args) if not args then args = {} end @@ -1290,6 +1292,8 @@ function widget.taglist.label.all(t, args) local fg_urgent = args.fg_urgent or theme.taglist_fg_urgent or theme.fg_urgent local bg_urgent = args.bg_urgent or theme.taglist_bg_urgent or theme.bg_urgent local taglist_squares = args.taglist_squares or theme.taglist_squares + local taglist_squares_sel = args.squares_sel or theme.squares_sel + local taglist_squares_unsel = args.squares_unsel or theme.squares_unsel local text local background = "" local sel = capi.client.focus @@ -1301,12 +1305,20 @@ function widget.taglist.label.all(t, args) end if sel and sel:tags()[t] then if not taglist_squares or taglist_squares == "true" then - background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\"" + if taglist_squares_sel then + background = "resize=\"true\" image=\"" .. taglist_squares_sel .. "\"" + else + background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarefw.png\"" + end end elseif bg_urgent or fg_urgent then for k, c in pairs(t:clients()) do if not taglist_squares or taglist_squares == "true" then - background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\"" + if taglist_squares_unsel then + background = "resize=\"true\" image=\"" .. taglist_squares_unsel .. "\"" + else + background = "resize=\"true\" image=\"@AWESOME_ICON_PATH@/taglist/squarew.png\"" + end end if c.urgent then bg_color = bg_urgent