-
-
Notifications
You must be signed in to change notification settings - Fork 717
Closed
Labels
Milestone
Description
The calculation for padding and truncation of label tokens is inconsistent. For max-width it counts the number of unicode characters while for min-width it counts the number of bytes. This falls apart if the token text contains non-ASCII.
We should always use unicode codepoints for min and max-width
Discussed in #3069
Originally posted by nymver January 4, 2024
So I have a module that displays the artist and title of current playing song. I have specified tokens (minimum and maximum width) (label = %output:-45:45%). If there are no Cyrillic letters in the text, everything is fine, but if there are, for some reason the width of the label is reduced.
Module:
[module/running_string]
type = custom/script
exec = $HOME/.config/polybar/scripts/running_string
tail = true
format = <label>
label = %output:-45:45%
perdakovich