From: martin f. krafft Date: Sat, 29 Dec 2018 09:36:18 +0000 (+0100) Subject: more xmms2 integration X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/d9d06cc7382128ca15ba691c68a088c6a3478324?ds=sidebyside;hp=-c more xmms2 integration --- d9d06cc7382128ca15ba691c68a088c6a3478324 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) -- }}}