X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/53ac76acf46b1d77a9d80b343892450d1b493f27..d9d06cc7382128ca15ba691c68a088c6a3478324:/.config/awesome/rc.lua diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 982aabd..1f2880f 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -910,14 +910,28 @@ awful.key(nil, "XF86AudioMicMute", function () awful.spawn("pactl set-source-mut awful.key({ cmdkey }, "Home", function () awful.spawn("pactl set-source-mute 1 toggle") end), awful.key(nil, "XF86MonBrightnessDown", function () awful.spawn("xbacklight -dec 5%") end), awful.key(nil, "XF86MonBrightnessUp", function () awful.spawn("xbacklight -inc 5%") end), -awful.key(nil, "XF86Display", function () awful.spawn("") end), +awful.key(nil, "XF86Display", function () awful.spawn("autorandr --change --force"); initialise_to_autorandr_profile() end), 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) -- }}}