This allows using custom unicode glyphs to render progress bars.
Requires a new setting
GlyphBar = in
pacman.conf (Use Fira Code to see these glyphs)
The setting is parsed but ignored if
ILoveCandy is also set.
The 6 glyphs in the string are [emptybar_beg, emptybar_mid, emptybar_end, fullbar_beg, fullbar_mid, fullbar_end] in that order.
Technically, any unicode chars can be used, even emoji, but the emoji's double-width will cause chaos, so don't
GlyphBar = ╠═╣┣━┫
GlyphBar = पगचदटड
pacman-conf.c also required a small refactor to be able to handle multibyte characters.
write_buildinfo() which always defaulted to
LC_ALL=C needed a change to not break when using
GlyphBar. It now uses
LC_ALL=C.UTF-8 if the user's locale's encoding is UTF-8, and falls back to
Feedback is welcome! Let me know if anything needs to be changed, or is missing.