From 540d5edb5f89b9797bcbf7bab16b5e1c869fbb73 Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Mon, 23 Aug 2021 11:17:36 +0300 Subject: [PATCH] mpris-widget: fix capture regex for playerctl output Before, the table ended up being something like {"status", "", "artist", "", ..}, so the output of the widget was garbled. --- mpris-widget/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpris-widget/init.lua b/mpris-widget/init.lua index c6b2ca6..7669b10 100644 --- a/mpris-widget/init.lua +++ b/mpris-widget/init.lua @@ -163,7 +163,7 @@ local function worker() local update_graphic = function(widget, stdout, _, _, _) -- mpdstatus, artist, current_song = stdout:match("(%w+)%;+(.-)%;(.*)") local words = {} - for w in stdout:gmatch("([^;]*)") do table.insert(words, w) end + for w in stdout:gmatch("([^;]*);") do table.insert(words, w) end mpdstatus = words[1] artist = words[2]