marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
478 stars 49 forks source link

Not working with different locale #55

Closed adrianlzt closed 2 years ago

adrianlzt commented 2 years ago

The script wasn't working for me and I realized the problems was the locale.

For example, pactl info was returning the messages in spanish, so greps weren't working.

Easy solution, prefix each pulseaudio-control:

LC_ALL=c pulseaudio-control
marioortizmanero commented 2 years ago

Hmm, as far as I know we already fixed this in #48. I'm guessing you're using a version after that? To be fair we added LANG and not LC_ALL, so maybe that's the issue. Could you try changing the script to export LC_ALL=c as well, inside?

adrianlzt commented 2 years ago

I think the best option is to set LC_ALL=C.

Link

There is also a special locale, called ‘C’. When it is used, it disables all localization: in this locale, all programs standardized by POSIX use English messages and an unspecified character encoding (often US-ASCII, but sometimes also ISO-8859-1 or UTF-8, depending on the operating system).

marioortizmanero commented 2 years ago

Fixed, let me know if it works correctly in the new version: https://github.com/marioortizmanero/polybar-pulseaudio-control/releases/tag/v2.2.4. I've uploaded it to the AUR as well.

adrianlzt commented 2 years ago

working. Thanks!