X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/0594fb0ebdfa65f1a15b820b9690d5802e82ad1b..c91c2e2d4b7f2243c13a267f7bfe4f3df73b35e3:/widgets/mpd.lua?ds=inline diff --git a/widgets/mpd.lua b/widgets/mpd.lua index d5f07a8..5af898b 100644 --- a/widgets/mpd.lua +++ b/widgets/mpd.lua @@ -67,7 +67,7 @@ local function worker(args) elapsed = "N/A" } - for line in f:lines() do + for line in string.gmatch(f, "[^\n]+") do for k, v in string.gmatch(line, "([%w]+):[%s](.*)$") do if k == "state" then mpd_now.state = v elseif k == "file" then mpd_now.file = v