summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomanos Skiadas <rom.skiad@gmail.com>2021-08-23 11:17:36 +0300
committerRomanos Skiadas <rom.skiad@gmail.com>2021-08-23 11:20:27 +0300
commit540d5edb5f89b9797bcbf7bab16b5e1c869fbb73 (patch)
tree85073c0ba08c2f3cfe271e137fa42b0b2ef53a15
parentcede33fa3f1418adc0714c85a2cfed42afdd4335 (diff)
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.
-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 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]