You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The control bars of alsamixer are quite coarse. They jump by whole character cells. Often a notable amount of increase or decrease (pressing the Up or Down arrow) isn't reflected visually.
I'd like to ask for an opion for more fine-grained looking control bars.
If the terminal's / locale's claimed charset, as reported by nl_langinfo(CODESET), is "UTF-8" (as it should be pretty much everywhere nowadays), you could use the Unicode characters U+2581 to U+2588 for this purpose. They jump by eighths of a cell's hight.
Their foreground color would be the desired bar color (red/white/green) and their background would be the default (or black for -B). For consistency, this mode should probably replace the current checkerboard (ACS_CKBOARD) characters by the full block U+2588 and only set its foreground, but maybe this doesn't matter.
There are several terminal emulators out there (at least VTE-based ones such as GNOME Terminal and many others; Konsole; and presumably much more) that don't take these glyphs from the font but rather draw them manually to perfectly align them at cell boundaries. In these terminals the bar would look perfectly. In other terminals there might be some ugly gaps at cell boundaries (subject to the selected font), but some people might still prefer this tiny visual glitch over the current coarseness of the bar (again: this would be an option, not a forced new behavior).
The interesting bits are done, to preview the feature. No config option yet (only the new behavior is available), no check for utf-8, no documentation.
Not sure if it works correctly with custom colors. The changes in colors.c are quite ugly: I happen to need two colors that were defined previously, and calling get_color_pair() again with the same colors wouldn't allocate a new COLOR_PAIR, so the COLOR_PAIR(x) indices had to be modified. I don't know how this business interferes with custom color definitions from the config file; maybe it forces two different color roles to be identical... needs investigation.
Activity
egmontkob commentedon Mar 2, 2025
Here's a quick proof of concept.
The interesting bits are done, to preview the feature. No config option yet (only the new behavior is available), no check for utf-8, no documentation.
Not sure if it works correctly with custom colors. The changes in colors.c are quite ugly: I happen to need two colors that were defined previously, and calling
get_color_pair()again with the same colors wouldn't allocate a new COLOR_PAIR, so theCOLOR_PAIR(x)indices had to be modified. I don't know how this business interferes with custom color definitions from the config file; maybe it forces two different color roles to be identical... needs investigation.alsamixer-smooth-PoC.patch.txt