mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
Dock rofi menu: Handle the case when a client has no name
This commit is contained in:
parent
a7a1729c24
commit
ce8aef24ac
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue