From d9d06cc7382128ca15ba691c68a088c6a3478324 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sat, 29 Dec 2018 10:36:18 +0100 Subject: [PATCH] more xmms2 integration --- .config/awesome/rc.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 95769b4..1f2880f 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -915,9 +915,23 @@ awful.key(nil, "XF86WLAN", function () awful.spawn("") end), awful.key(nil, "XF86Tools", function () awful.spawn("") end), awful.key(nil, "XF86Search", function () awful.spawn("") end), awful.key(nil, "XF86LaunchA", function () awful.spawn("") end), -awful.key(nil, "XF86Explorer", function () awful.spawn("") end) +awful.key(nil, "XF86Explorer", function () awful.spawn("") end), + +awful.key({ cmdkey }, "Left", function () awful.spawn("xmms2 prev") end), +awful.key({ cmdkey }, "Right", function () awful.spawn("xmms2 next") end), +awful.key({ cmdkey }, "space", function () awful.spawn("xmms2 toggle") end), +awful.key({ cmdkey }, "\\", function () run_output_notify("xmms2 list") end) ) +function run_output_notify(cmd) + awful.spawn.easy_async(cmd, function(stdout, stderr, reason, exit_code) + naughty.notify({ + preset = naughty.config.presets.low, + title = "XMMS2 playlist", + text = stdout}) + end) +end + -- Set keys root.keys(globalkeys) -- }}} -- 2.39.5