dust icon indicating copy to clipboard operation
dust copied to clipboard

256 Color output not working on urxvt

Open MithicSpirit opened this issue 4 years ago • 6 comments

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.

MithicSpirit avatar Jan 17 '21 14:01 MithicSpirit

This is me:

$ echo $TERM xterm-256color

Do programs like dutree & exa work correctly with their colors?

bootandy avatar Mar 02 '21 20:03 bootandy

No, those aren't working either. Though the script at https://gist.githubusercontent.com/HaleTom/89ffe32783f89f403bba96bd7bcd1263/raw/ does print the 256 color output correctly.

MithicSpirit avatar Mar 02 '21 22:03 MithicSpirit

could be related to: https://github.com/bootandy/dust/issues/138

bootandy avatar May 12 '21 08:05 bootandy

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.

bootandy avatar Sep 03 '21 22:09 bootandy

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): Screenshot from 2021-12-17 02-19-06

cyhyraethz avatar Dec 17 '21 10:12 cyhyraethz

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.

MithicSpirit avatar Jan 06 '22 04:01 MithicSpirit

Closing this as won't fix. However, if someone wants to make this work with fancier 256 color terminals I'd accept a PR

bootandy avatar Aug 23 '22 08:08 bootandy