summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomanos Skiadas <rom.skiad@gmail.com>2021-10-15 17:19:05 +0300
committerRomanos Skiadas <rom.skiad@gmail.com>2021-10-15 17:51:59 +0300
commitdb0b3e9e8cbe54d1fe7a6c6b38e83366ae1c744d (patch)
tree4a130de4946d10bd4907fb443ec1df5c56c82527
parent2755f856236acc05b1e860076931de7b0f5fba61 (diff)
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.
-rw-r--r--mpris-widget/init.lua2
1 files changed, 1 insertions, 1 deletions
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{