From 5fd8b72eb1d8b1b1ef981d9ba57e8070d51c308e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 4 Jun 2021 11:10:21 +0200 Subject: bindings: add a binding for mute --- bindings.lua | 1 + utils.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bindings.lua b/bindings.lua index 08ac445..087e4c3 100644 --- a/bindings.lua +++ b/bindings.lua @@ -34,6 +34,7 @@ function M.create(workspace) -- audio control awful.key({ modkey }, "Prior", function () utils.vol_control(1) end), awful.key({ modkey }, "Next", function () utils.vol_control(-1) end), + awful.key({ modkey }, "End", utils.vol_mute_toggle), awful.key({ modkey }, "grave", function () awful.spawn("mpc toggle") end), awful.key({ modkey }, "b", function () awful.spawn("mpc next") end), awful.key({ modkey }, "p", function () awful.spawn("mpc prev") end), diff --git a/utils.lua b/utils.lua index 77f2b54..01bd70f 100644 --- a/utils.lua +++ b/utils.lua @@ -35,6 +35,10 @@ function M.vol_control(n) awful.spawn(cmd) end +function M.vol_mute_toggle() + awful.spawn("amixer -q set Master toggle") +end + function M.spawn_current(command) awful.spawn(command, {tag = mouse.screen.selected_tag}) end -- cgit v1.2.3