Dock rofi menu: Handle the case when a client has no name

This commit is contained in:
elenapan 2020-06-30 21:30:21 +03:00
parent a7a1729c24
commit ce8aef24ac

View file

@ -221,9 +221,14 @@ local function generate_dock_icon(c, bg, fg, symbol)
-- Each line corresponds to 1 client
local rofi_input = ""
for i = 1, #clients do
rofi_input = rofi_input..prefix..' '..clients[i].name..'\n'
if clients[i].name then
rofi_input = rofi_input..prefix..' '..clients[i].name..'\n'
end
end
-- Nothing to do
if rofi_input == "" then return end
-- Remove last \n
rofi_input = rofi_input:sub(1, #rofi_input - 1)