From ceb861e54904a5c03354e3a6041b6574480b36b4 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 22 Apr 2013 14:01:28 +0200 Subject: [PATCH] improve nyxmms current notification --- .config/awesome/rc.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 1bbe2d4..c558b8d 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -451,7 +451,9 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ cmdmodkey }, "space", function () awful.util.spawn("nyxmms2 toggle") end), awful.key({ cmdmodkey }, "backslash", function () local f = io.popen('nyxmms2 current', 'r') - naughty.notify({ title = "Now playing", text = string.sub(f:read(), 10), timeout = 5 }) + for s, t in string.gmatch(f:read(), '(%w+):%s+([^:]+)') do + naughty.notify({ title = s, text = t, timeout = 5 }) + end f:close() end), awful.key({ cmdmodkey, "Shift" }, "backslash", function () -- 2.39.2