From 01daaf8d58759f3c9960b5873f6651d073224ab5 Mon Sep 17 00:00:00 2001 From: Maciej Janicki Date: Tue, 14 Mar 2023 23:16:18 +0200 Subject: [PATCH] Make the pactl-widget work with non-English locale --- pactl-widget/pactl.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pactl-widget/pactl.lua b/pactl-widget/pactl.lua index 638dc7e..0dbae94 100644 --- a/pactl-widget/pactl.lua +++ b/pactl-widget/pactl.lua @@ -36,7 +36,7 @@ function pactl.get_volume(device) end 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 return true else @@ -57,7 +57,7 @@ function pactl.get_sinks_and_sources() local value 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 in_section = nil