mic update

This commit is contained in:
Luca 2023-02-26 22:20:08 +01:00
parent e3687a3c42
commit 6b4486eded

View file

@ -113,13 +113,13 @@ local mic = wibox.widget {
}
local update_mic = function()
awful.spawn.easy_async_with_shell("pamixer --source alsa_input.usb-1c1f_USB_PnP_Audio_Device-00.mono-fallback --get-volume", function(stdout)
awful.spawn.easy_async_with_shell("pamixer --source 5891 --get-volume", function(stdout)
mic_slider.value = tonumber(stdout:match("%d+"))
end)
end
mic_slider:connect_signal("property::value", function(_, mic_vol)
awful.spawn("pamixer --source alsa_input.usb-1c1f_USB_PnP_Audio_Device-00.mono-fallback --set-volume ".. mic_vol, false)
awful.spawn("pamixer --source 5891 --set-volume ".. mic_vol, false)
-- Update textbox widget text
mic_osd_value.text = mic_vol .. "%"
awesome.emit_signal("module::mic_osd_value", mic_vol)