diff --git a/pulsemixer b/pulsemixer index 6b0c8c6..a2d98c9 100755 --- a/pulsemixer +++ b/pulsemixer @@ -1122,7 +1122,17 @@ class Screen(): for i in line.split('\n'): parts = i.rsplit('|') head = ''.join(parts[:-1]) - tail = int(parts[-1] or 0) + + # Fix: Check if there's a pipe separator and if the last part is a valid number + if len(parts) > 1 and parts[-1].strip().lstrip('-').isdigit(): + tail = int(parts[-1]) + elif len(parts) > 1 and parts[-1].strip() == '': + tail = 0 + else: + # No pipe separator or invalid number, treat entire string as head with no formatting + head = i + tail = 0 + try: win.addstr(index, shift, head, tail | mod) except: