Add media keys control to awesome.

-- requires the alas-utils and playerctl packages.
master
josiah 4 years ago
parent 955684b8e1
commit 5f14eb9286

@ -417,7 +417,26 @@ for i = 1, 9 do
end
end
end,
{description = "toggle focused client on tag #" .. i, group = "tag"})
{description = "toggle focused client on tag #" .. i, group = "tag"}),
awful.key({}, "XF86AudioLowerVolume", function ()
awful.util.spawn("amixer -q -D pulse sset Master 5%-", false)
end),
awful.key({}, "XF86AudioRaiseVolume", function ()
awful.util.spawn("amixer -q -D pulse sset Master 5%+", false)
end),
awful.key({}, "XF86AudioMute", function ()
awful.util.spawn("amixer -D pulse set Master 1+ toggle", false)
end),
-- Media Keys
awful.key({}, "XF86AudioPlay", function()
awful.util.spawn("playerctl play-pause", false)
end),
awful.key({}, "XF86AudioNext", function()
awful.util.spawn("playerctl next", false)
end),
awful.key({}, "XF86AudioPrev", function()
awful.util.spawn("playerctl previous", false)
end)
)
end

Loading…
Cancel
Save