From 601e37e61f73948572a428a0d6a35490c57bb4cf Mon Sep 17 00:00:00 2001 From: dongkc Date: Mon, 6 Mar 2017 14:47:47 +0000 Subject: [PATCH] add extra keypad bindings --- rc.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rc.lua b/rc.lua index ce84f63..ccd3960 100644 --- a/rc.lua +++ b/rc.lua @@ -339,6 +339,23 @@ globalkeys = awful.util.table.join( awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end), awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end), + -- ALSA volume control for Thinkpad Extra Keypad + awful.key({ }, "XF86AudioRaiseVolume", + function () + os.execute(string.format("amixer -q set %s 1%%+", beautiful.volume.channel)) + beautiful.volume.update() + end), + awful.key({ }, "XF86AudioLowerVolume", + function () + os.execute(string.format("amixer -q set %s 1%%-", beautiful.volume.channel)) + beautiful.volume.update() + end), + awful.key({ }, "XF86AudioMute", + function () + os.execute(string.format("amixer -q set %s toggle", beautiful.volume.togglechannel or beautiful.volume.channel)) + beautiful.volume.update() + end), + -- ALSA volume control awful.key({ altkey }, "Up", function ()