dust
dust copied to clipboard
256 Color output not working on urxvt
Despite using URxvt patched for 256color output, dust still uses the unicode "dither" characters in the usage boxes to the right. The 256color gradient works fine on Konsole for me. My $TERM environment variable is rxvt-unicode-256color and the output of tput color is 256.
This is me:
$ echo $TERM xterm-256color
Do programs like dutree & exa work correctly with their colors?
No, those aren't working either. Though the script at https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ does print the 256 color output correctly.
could be related to: https://github.com/bootandy/dust/issues/138
I'll look at this, the sample script provides shades of grey so it should be possible to detect if the terminal supports 256 color and support it.
I'm having the same problem with kitty terminal. $TERM is xterm-kitty, output of tput colors is 256, and the the bar graph comes out looking like this (the greys are solid and look good in gnome-terminal where $TERM is xterm-256color though):

I have switched to Alacritty some time ago and, for a while, this issue persisted, but with a recent commit it was fixed (f717710, see issue https://github.com/alacritty/alacritty/issues/5485). This seems to be mainly a problem with the terminal, so feel free to mark this issue as closed.
However, it may be possible to work around this problem on terminals that don't properly support the "dither" characters (the ones in the BLOCKS array in display.rs) by adding 256-color support (specifically, using the █ character along with color codes for different shades of gray). Whether or not terminals support these characters would probably have to be done manually by either hardcoding based on the TERM envvar and/or adding a CLI flag.
Closing this as won't fix. However, if someone wants to make this work with fancier 256 color terminals I'd accept a PR