0

Today I upgraded my IPython installation from 3.2.3 to 5.1 via the FreeBSD ports system. If it matters, I'm using Python 3.6.

The new colors used in the terminal are ugly in my eyes. (I'm using the urxvt terminal in transparent mode.)

How do I restore the looks of the IPython terminal from the 3.2.3 release?

In my .ipython/profile_default/ipython_config.py I've tried setting InteractiveShell.colors to the values listed in the documentation. None of them looked like they used to.

Alternatively, I've tried most of the pygments highlighting styles available via TerminalInteractiveShell.highlighting_style. They don't look good on a transparent background either.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94

1 Answers1

0

For now, I've settled on giving the terminal window a solid dark background (base03: #002b36) from the solarized colorscheme, in combination with the native highlighting theme. This is accomplished as follows.

In my window manager setup, I have a special invocation for starting IPython in a terminal:

urxvt +tr -bg '#002b36' -title IPython -e ipython

This is necessary because my standard urxvt windows are set as transparent via the .Xresources file, and I need to override those. It is also convenient.

My ipython_config.py looks like this:

c = get_config()
c.TerminalIPythonApp.display_banner = False
c.TerminalInteractiveShell.confirm_exit = False
c.TerminalInteractiveShell.highlighting_style = 'native'
c.InteractiveShell.editor = 'gvim'
c.InteractiveShell.deep_reload = True

Note: If you choose a highlighting style like I did above, the %colors magic does not work anymore in IPython 5.1.

Note2: Better support for 24-bit colors in urxvt is coming. Once that is released, I will probably install pygments-style-solarized and use that instead, since I'm already using solarized in gvim.

Roland Smith
  • 42,427
  • 3
  • 64
  • 94