Add section on colors to windows guide

This commit is contained in:
Morten Enemark Lund 2016-07-06 23:41:14 +02:00
parent f5abd4d9ff
commit 97364d79de
2 changed files with 76 additions and 0 deletions

46
docs/_static/xterm_colors.reg vendored Normal file
View file

@ -0,0 +1,46 @@
Windows Registry Editor Version 5.00
; Registry file that maps the solarized palette to the 16 avaliable colors
; in a Windows command prompt. Note, hex values in the table are RGB but byte
; ordering of a DWORD is BGR, e.g. "ColorTable<##>"=dword:00<B><G><R>
;
; OLD MODIFY
; NR cmd.exe HEX DWORD HEX DWORD
; -- ------- ------ --------- ------- --------
; 00 Black 000000 00000000 #323232 00323232
; 01 Blue 000080 00800000 #0000EE 00EE0000
; 02 Green 008000 00008000 #00CD00 0000CD00
; 03 Aqua 008080 00808000 #00CDCD 00CDCD00
; 04 Red 800000 00000080 #CD0000 000000CD
; 05 Purple 800080 00800080 #CD00CD 00CD00CD
; 06 Yellow 808000 00008080 #CDCD00 0000CDCD
; 07 White C0C0C0 00C0C0C0 #E5E5E5 00E5E5E5
; 08 Gray 808080 00808080 #7F7F7F 007F7F7F
; 09 LightBlue 0000FF 00FF0000 #5C5CFF 00FF5C5C
; 10 LightGreen 00FF00 0000FF00 #00FF00 0000FF00
; 11 LightAqua 00FFFF 00FFFF00 #00FFFF 00FFFF00
; 12 LightRed FF0000 000000FF #FF0000 000000FF
; 13 LightPurple FF00FF 00FF00FF #FF00FF 00FF00FF
; 14 LightYellow FFFF00 0000FFFF #FFFF00 0000FFFF
; 15 BrightWhite FFFFFF 00FFFFFF #FFFFFF 00FFFFFF
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00000000
"ColorTable01"=dword:00EE0000
"ColorTable02"=dword:0000CD00
"ColorTable03"=dword:00CDCD00
"ColorTable04"=dword:000000CD
"ColorTable05"=dword:00CD00CD
"ColorTable06"=dword:0000CDCD
"ColorTable07"=dword:00E5E5E5
"ColorTable08"=dword:007F7F7F
"ColorTable09"=dword:00FF5C5C
"ColorTable10"=dword:0000FF00
"ColorTable11"=dword:00FFFF00
"ColorTable12"=dword:000000FF
"ColorTable13"=dword:00FF00FF
"ColorTable14"=dword:0000FFFF
"ColorTable15"=dword:00FFFFFF
"ScreenColors"=dword:00000007
"PopupColors"=dword: 000000f8

View file

@ -71,9 +71,36 @@ Next, run xonsh:
.. _cmder: http://cmder.net/
.. _conemu: https://conemu.github.io/
Usage
================
Color style
--------------------------------
The default dark red and blue colors are complete unreadable in Windows' default
terminal. To give new a the best experience Xonsh automatically
replaces some of the dark colors with more readable alternatives (e.g. blue
becomes cyan). The behaviour is controlled with the ``$INTENSIFY_COLORS_ON_WIN``
environment variable.
It is possible to configure the Windows console with readable default colors.
This following `xterm_colors.reg`_ registry file will configure the colors to
more reable defaults.
With better colors configured, ``$INTENSIFY_COLORS_ON_WIN`` can be disabled and
the prompt can be changed to match how it looks on posix and mac. Add the
follwing to the xonsh run control file ``.xonshrc``:
.. code-block:: xonshcon
>>> $INTENSIFY_COLORS_ON_WIN = False
>>> $PROMPT = $PROMPT.replace('INTENSE_','').replace('CYAN','BLUE')
.. _xterm_colors.reg: http://xon.sh/_static/xterm_colors.reg
Name space conflicts
--------------------
@ -108,6 +135,9 @@ You can add aliases to your ``~/.xonshrc`` to have it always
available when xonsh starts.
Unicode support for Windows
----------------------------