volume: use amixer -D pulse

For some reason, without it, it doesn't work anymore, even with ALSA
configured to use Pulseaudio.
This commit is contained in:
Vincent Bernat 2018-11-10 00:20:16 +01:00
parent 4267dc2927
commit af618d1d00

View file

@ -14,9 +14,9 @@ module("vbe/volume")
local volid = nil
local function change(what)
os.execute("amixer -q sset Master " .. what, false)
os.execute("amixer -q -D pulse sset Master " .. what, false)
-- Read the current value
local out = awful.util.pread("amixer sget Master")
local out = awful.util.pread("amixer -D pulse sget Master")
local vol, mute = out:match("([%d]+)%%.*%[([%l]*)")
if not mute or not vol then return end