GeorgeFilipkin / pulsemixer

CLI and curses mixer for PulseAudio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Curses rendering broken / overflowing

shayne opened this issue · comments

Been using pulsemixer consistently, and everything has been fine. I opened it this morning and this is what I see:

deepinscreenshot20161019085416

I'm looking for a jumping off point in debugging / fixing this. Any ideas?

Changing BAR_ON to "." fixes the issue. I guess my terminal is not rendering a monopace square? Using termite.

The font I'm using is PragmataPro (which was working fine until recently). Tried changing it to Droid Sans Mono with the same results. Tried gnome-terminal with the same results too.

Seeing how changing BAR_ON from large square (2B1B, Unicode 5.1) fixes the issue there are 2 things I can think of:

  1. len('⬛') returns something other than 1, but with Python 3 this should never be the case.
  2. Something somewhere in your system has been updated/changed. This would also explain why pulsemixer was working fine a few days ago and why this bug is so tricky to reproduce.

In any case, this symbol has proved to be very troublesome. On some terminals/fonts it doesn't display correctly, on others it is simply missing or causing issues similar to this one.
Replacing it would be the way to go. ▮ (25AE) should look close enough and be more reliable as it was introduced in one of the first versions of Unicode. But I need you to test it for me before pushing.

I am encountering the exact same issue using xfce4-terminal. The issue does not appear in xterm or urxvt. I also have not yet found a font where this issue does not appears, but the xfce terminal just uses the character from a different font, if the current font does not have it, so it is very difficult to figure out which font is the culprit.

For now, I will just export a PULSEMIXER_BAR_STYLE with a different symbol for BAR_ON.

EDIT: I just realized, the reason why the issue does not appear in xterm and urxvt is because they do not use fallback fonts and just show a dotted square:
2016-10-20-160924_941x502_scrot

Confirmed Python 3 and len == 1. I agree something could've been updated, but for the life of me I can't understand what would cause this change. Perhaps latest GTK/Gnome changes?

Here are the results of changing the BAR_ON character, using master.

screenshot-a
screenshot-b

Doesn't look like the problem is in the pulsemixer itself, but likely in some updated dependency. So for now I'm simply changing default BAR_ON from 2B1B to 25AE.