Make the pactl-widget work with non-English locale

This commit is contained in:
Maciej Janicki 2023-03-14 23:16:18 +02:00
parent c8388f484e
commit 01daaf8d58
1 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ function pactl.get_volume(device)
end end
function pactl.get_mute(device) function pactl.get_mute(device)
local stdout = utils.popen_and_return('pactl get-sink-mute ' .. device) local stdout = utils.popen_and_return('LC_ALL=C pactl get-sink-mute ' .. device)
if string.find(stdout, "yes") then if string.find(stdout, "yes") then
return true return true
else else
@ -57,7 +57,7 @@ function pactl.get_sinks_and_sources()
local value local value
local in_section local in_section
for line in utils.popen_and_return('pactl list'):gmatch('[^\r\n]*') do for line in utils.popen_and_return('LC_ALL=C pactl list'):gmatch('[^\r\n]*') do
if string.match(line, '^%a+ #') then if string.match(line, '^%a+ #') then
in_section = nil in_section = nil