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.
This commit is contained in:
parent
cede33fa3f
commit
540d5edb5f
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue