Media keys with mpris

This commit is contained in:
Thomas Forgione 2024-04-09 10:10:03 +02:00
parent 53a8ba106a
commit 18a277e8b1
1 changed files with 12 additions and 0 deletions

12
rc.lua
View File

@ -439,6 +439,18 @@ globalkeys = awful.util.table.join(
awful.util.spawn("xbacklight -inc 2") awful.util.spawn("xbacklight -inc 2")
end, {description = "increase brightness", group="Fn Keys"}), end, {description = "increase brightness", group="Fn Keys"}),
awful.key({ }, "XF86AudioPlay", function ()
awful.util.spawn("playerctl -a play-pause")
end, {description = "pause or resume music", group="Media Keys"}),
awful.key({ }, "XF86AudioStop", function ()
awful.util.spawn("playerctl -a stop")
end, {description = "stop music", group="Media Keys"}),
awful.key({ }, "XF86AudioNext", function ()
awful.util.spawn("playerctl -a next")
end, {description = "next music", group="Media Keys"}),
awful.key({modkey}, "#82", function () awful.key({modkey}, "#82", function ()
awful.util.spawn("xbacklight -dec 2") awful.util.spawn("xbacklight -dec 2")
end, {description = "decrease brightness", group="Brightness controls"}), end, {description = "decrease brightness", group="Brightness controls"}),