Grégory Reinbold is a user on bsd.network. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Grégory Reinbold @greinbold

Is there any way to get a monochrome terminal without editing the color palette or TERM env var? I tried many tips, but there is always one soft to print color (e.g. Vim, WeeChat, ...). Why it is so complex to get a simple terminal (just choose a fg ang bg color)?

· Web · 0 · 1

@greinbold Why is changing the TERM variable bad?

Otherwise, I wonder if you can patch #st to ignore colors haha.

@mpts It is not bad, it is complicated with tmux or screen because I have to define the TERM var for each tab. I will just set one fg and bg color for all context. I have to admin many machines under many OS. I can't set the TERM for each. It is not possible to only set the terminal on my machine and apply the configuration to all context? Just like a old black and white monitor maybe? OMG do not tell me is that I have to do! 😂

@greinbold You can append so called mode suffixes to your TERM variable.

TERM=ansi-m should do the trick for you.

See terminfo(5) for details.

@kn TERM=xterm-mono works well in a ssh->tmux/screen context (like my previous screenshot), but out of this context, vim and other software can colorize. Look on this screenshot. I'm out of any tmux/screen context, my TERM is set to xterm-mono and vim with syntax off is colorized.

@greinbold Use ~/.Xresources to set the palette:

XTerm.*.foreground: white
XTerm.*.background: black
XTerm.*.color0: rgb:0/0/0
...
XTerm.*.colorN: rgb:0/0/0

@greinbold @kn I think screen has a facility to do some termcap hacking for you so that would be "only" updating screenrc files instead of restarting all shells.