Wednesday, March 31, 2021

Back to the future: Recolorizing Windows

 But it's 2021, and now when I'm working on Windows, it's in a Windows VM running on a developer-friendly machine.

This might be the first of a series, so stay tuned, if you're into that sort of thing. But right now, it's a repository for hints to remind me next time I have to work with this OS.

First, because it's 2021, everything is dark. Windows terminal backgrounds are black. And many of the text colors are dark as well. Great if you really don't want to see what you're doing. So here's today's fix:

1. Fire up a linux shell to get into WSL.

2. Run this:

$ cd ~
$ dircolors -p |
sed -E -e 's/^(DIR) (.*) #/\1 01;36 #/' \
     -e 's/(LINK) (.*?) #/\1 01;32 #/' \
    -e 's/(OTHER_WRITABLE) (.*?) #/\1 01;36 #/' > .dircolors

$ set noclobber
$ cat >> .bashrc
if [ -f ~/.dircolors ] ; then 
  eval $(dircolors -b ~/.dircolors)
fi
<Ctrl-D>

That handles ls (1). Next week (maybe): vim (1)