greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

mismatched characters in bar graph #865

Closed Thra11 closed 4 years ago

Thra11 commented 4 years ago

The bar graph used for up/down net graph uses these characters to represent different levels:

https://github.com/greshake/i3status-rust/blob/d258f6614efd790c2969b6db4eb6128287df4a3c/src/widgets/graph.rs#L52

All except the first are "block" characters from the same unicode set, so they are almost guaranteed to be the same width, even in proportional-width fonts (I'm using oxygen-font). However, the first character is an underscore, which isn't related to the others, and often has a different width. This means that the overall width of the bar graph fluctuates depending on how many "low" values are currently displayed.

I think it looks better if we just drop the underscore from the list (I think the per-CPU bar graph already uses these characters, without the underscore, so it's slightly more consistent too).

ammgws commented 4 years ago

Sounds OK to me