Add audiowheel for microphone

This commit is contained in:
Alexander Gehrke 2021-07-12 11:38:02 +02:00
parent d84c71096b
commit 5ac1ad1a68
2 changed files with 7 additions and 6 deletions

@ -1 +1 @@
Subproject commit 0586032fd928cf5ee436480413ce868dcf48158c Subproject commit 3636e4b51cf1ebec8ec25049da3a1058d0b046e8

11
rc.lua
View file

@ -53,11 +53,12 @@ awful.screen.connect_for_each_screen(function(s)
end) end)
-- }}} -- }}}
audiowheel = require("audiowheel") { audiowheel = require("audiowheel")
speakerwheel = audiowheel {
image_prefix = "/usr/share/icons/Adwaita/256x256/legacy/", image_prefix = "/usr/share/icons/Adwaita/256x256/legacy/",
} }
micwheel = require("audiowheel") { micwheel = audiowheel {
image_prefix = "/usr/share/icons/Adwaita/48x48/legacy/", image_prefix = "/usr/share/icons/Adwaita/48x48/legacy/",
image_muted = "microphone-sensitivity-muted.png", image_muted = "microphone-sensitivity-muted.png",
image_low = "microphone-sensitivity-low.png", image_low = "microphone-sensitivity-low.png",
@ -81,9 +82,9 @@ mybindings = awful.util.getdir("config") .. "/mybindings.lua"
binder.add_reloadable(function() return dofile(mybindings) end) binder.add_reloadable(function() return dofile(mybindings) end)
binder.add_bindings(awful.util.table.join( binder.add_bindings(awful.util.table.join(
awful.key({}, "XF86AudioRaiseVolume", function() audiowheel:up() end), awful.key({}, "XF86AudioRaiseVolume", function() speakerwheel:up() end),
awful.key({}, "XF86AudioLowerVolume", function() audiowheel:down() end), awful.key({}, "XF86AudioLowerVolume", function() speakerwheel:down() end),
awful.key({}, "XF86AudioMute", function() audiowheel:toggle() end), awful.key({}, "XF86AudioMute", function() speakerwheel:toggle() end),
awful.key({"Shift"}, "XF86AudioRaiseVolume", function() micwheel:up() end), awful.key({"Shift"}, "XF86AudioRaiseVolume", function() micwheel:up() end),
awful.key({"Shift"}, "XF86AudioLowerVolume", function() micwheel:down() end), awful.key({"Shift"}, "XF86AudioLowerVolume", function() micwheel:down() end),
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end) awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)