make tag preview fallback to a awesomewm icon
This commit is contained in:
parent
7277f57730
commit
0a49f7ff43
|
@ -36,14 +36,19 @@ local function draw_widget(
|
|||
local tag_screen = t.screen
|
||||
for i, c in ipairs(t:clients()) do
|
||||
if not c.hidden and not c.minimized then
|
||||
|
||||
local img_box = wibox.widget ({
|
||||
image = gears.surface.load(c.icon),
|
||||
resize = true,
|
||||
forced_height = 100 * scale,
|
||||
forced_width = 100 * scale,
|
||||
widget = wibox.widget.imagebox,
|
||||
})
|
||||
|
||||
-- If fails to set image, fallback to a awesome icon
|
||||
if not pcall(function() img_box.image = gears.surface.load(c.icon) end) then
|
||||
img_box.image = beautiful.theme_assets.awesome_icon (24, "#222222", "#fafafa")
|
||||
end
|
||||
|
||||
if tag_preview_image then
|
||||
if c.prev_content or t.selected then
|
||||
local content
|
||||
|
|
Loading…
Reference in New Issue