I typically have a lot of windows open on a lot of different computers. I want to have the .bash_profile
on each machine set the foreground and background color to a color that is specific for that machine.
I use mintty on Cygwin, and iTerm on the Mac, and sometimes xterm or aterm or gnome-terminal.
If I change the foreground and background colors in the program's specific GUI, they stick, and going into EMACS or doing a ls
with the --color
option doesn't change it.
But if I use the ANSI sequence to set the foreground and background color to a 24-bit color, as soon as EMACS or ls tries to put something in a different color, the colors of my terminal reverts back to the default foreground and background color.
Is there any way to change the default foreground and background color with an ESCAPE SEQUENCE, rather than with the GUI?