From db0b3e9e8cbe54d1fe7a6c6b38e83366ae1c744d Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Fri, 15 Oct 2021 17:19:05 +0300 Subject: mpris-widget: fix incorrect boolean expression the loop is not meant to be executed if the player name is nil or '', so the expression needs to be an and. --- mpris-widget/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mpris-widget') diff --git a/mpris-widget/init.lua b/mpris-widget/init.lua index 040c34c..0dac632 100644 --- a/mpris-widget/init.lua +++ b/mpris-widget/init.lua @@ -73,7 +73,7 @@ local popup = awful.popup{ local function rebuild_popup() awful.spawn.easy_async(LIST_PLAYERS_CMD, function(stdout, _, _, _) for player_name in stdout:gmatch("[^\r\n]+") do - if player_name ~='' or player_name ~=nil then + if player_name ~='' and player_name ~=nil then for i = 0, #rows do rows[i]=nil end local checkbox = wibox.widget{ -- cgit v1.2.3