Awesome WM media key configuration

Configuring the awesome window manager is not as easy at it should since most of the time, you have to dig quite deep to find example or explanations on how to do things, not really casual user friendly. That said, it’s usually worth it, since it improves (my) efficiency.

nonetheless here is my snippet to add bindings to the multimedia keys usually found on keyboards those days.

in the keys bindings sections, you need to add something in the:

-- Multimedia keys
awful.key({}, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset pcm 2dB-") end),
awful.key({}, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset pcm 2dB+") end),
awful.key({}, "XF86HomePage", function () awful.util.spawn(browser) end),
awful.key({}, "XF86Mail", function () awful.util.spawn(mailreader) end),
awful.key({}, "XF86Calculator", function () awful.util.spawn("gnome-calculator") end),
awful.key({}, "XF86AudioPlay", function () awful.util.spawn("rhythmbox-client --play", false) end),
awful.key({}, "XF86Back", function () awful.util.spawn("rhythmbox-client --previous") end),
awful.key({}, "XF86Forward", function () awful.util.spawn("rhythmbox-client --next") end),
awful.key({}, "XF86AudioMute", function () awful.util.spawn("amixer -q sset Master toggle") end),
awful.key({}, "XF86Favorites", function () awful.util.spawn(terminal) end),

There’s a , at the end of the block, since i’ve got other key bindings after this block, but if that’s your last block, don’t forget to remove it. There’s also the following keys that i don’t use: XF86Media, XF86Eject, XF86AudioPause


posted by Vincent Hanquez on January 6, 2010.

tags awesome, media, configuration.

in technical.