mpris-widget: correctly clean list of players

Do it outside the loop, otherwise the last player wins.
This commit is contained in:
Romanos Skiadas 2021-10-15 17:41:37 +03:00
parent db0b3e9e8c
commit c5852546ae
1 changed files with 1 additions and 1 deletions

View File

@ -72,9 +72,9 @@ local popup = awful.popup{
local function rebuild_popup()
awful.spawn.easy_async(LIST_PLAYERS_CMD, function(stdout, _, _, _)
for i = 0, #rows do rows[i]=nil end
for player_name in stdout:gmatch("[^\r\n]+") do
if player_name ~='' and player_name ~=nil then
for i = 0, #rows do rows[i]=nil end
local checkbox = wibox.widget{
{