Add volume wheel instance for microphone

This commit is contained in:
Alexander Gehrke 2021-06-06 03:00:15 +00:00
parent ae4c7f06c5
commit a2f0c02920
2 changed files with 17 additions and 2 deletions

18
rc.lua
View file

@ -53,7 +53,18 @@ awful.screen.connect_for_each_screen(function(s)
end) end)
-- }}} -- }}}
audiowheel = require("audiowheel")-- { bg = "#ffff00aa" } audiowheel = require("audiowheel") {
image_prefix = "/usr/share/icons/Adwaita/256x256/legacy/",
}
micwheel = require("audiowheel") {
image_prefix = "/usr/share/icons/Adwaita/48x48/legacy/",
image_muted = "microphone-sensitivity-muted.png",
image_low = "microphone-sensitivity-low.png",
image_medium = "microphone-sensitivity-medium.png",
image_high = "microphone-sensitivity-high.png",
volume_control = { tooltip = false, channel = "Dmic0" }
}
-- {{{ Key bindings -- {{{ Key bindings
@ -72,7 +83,10 @@ 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() audiowheel:up() end),
awful.key({}, "XF86AudioLowerVolume", function() audiowheel:down() end), awful.key({}, "XF86AudioLowerVolume", function() audiowheel:down() end),
awful.key({}, "XF86AudioMute", function() audiowheel:toggle() end) awful.key({}, "XF86AudioMute", function() audiowheel:toggle() end),
awful.key({"Shift"}, "XF86AudioRaiseVolume", function() micwheel:up() end),
awful.key({"Shift"}, "XF86AudioLowerVolume", function() micwheel:down() end),
awful.key({}, "XF86AudioMicMute", function() micwheel:toggle() end)
)) ))
binder.apply() binder.apply()

View file

@ -3,6 +3,7 @@
local awful = require("awful") local awful = require("awful")
theme = {} theme = {}
theme.wallpaper = "~/.wallpaper" theme.wallpaper = "~/.wallpaper"
theme.icon_theme = "Adwaita"
-- }}} -- }}}
-- {{{ Styles -- {{{ Styles