martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
843 stars 108 forks source link

Doesn't display all 256 colors, only 204 or 209 #117

Open mik13ST opened 3 years ago

mik13ST commented 3 years ago

I am trying to migrate from Tmux to this simpler tool, but I am facing problems with 256 color support. Can anyone help me troubleshoot this?

To test the color support I am using (x=\`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done) from ArchWiki.

What I get looks like this: image

This works fine outside DVTM.

I am running this test in Xterm 361 while using Bash 5.0.18. DVTM version is 0.15. I test this by launching Xterm and running the test (it works fine). Then from that shell I launch dvtm and run the test inside it (it looks bad). For the sake of simple troubleshooting I reduced my configs as much as possible.

.bashrc: empty .profile: doesn't exist .Xresources:

XTerm*termName: xterm-256color

With my custom .Xresources file, the test stops changing color at number 209 instead of 204. It might be hint something, I don't know.

EDIT: This definitely isn't a bug, it works on a different Debian based system in my vicinity. So I am just asking for help with troubleshooting.

pspeder commented 3 years ago

What's the value of the env. variable $TERM inside dvtm? If it's not dvtm-256color, you could try setting that before running the colour test script. That terminfo should be available on arch.

If it works, you should export DVTM_TERM=dvtm-256color from your shell config to persist that change. See the man-page section titled ENVIRONMENT VARIABLES.

Hope this helps.

imlauera commented 1 year ago

I export the variables DVTM_TERM=dvtm-256color and TERM=dvtm-256color inside .zshrc and .profile but still cannot display all 256 colors.