Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython qtconsole highlighting

I am using the IPython qtconsole and the directories are dark blue and I can't seem to find any way to change this in the theme. I'm using pygments with the monokai theme for the syntax highlighting.

enter image description here

like image 627
Derek Litz Avatar asked Dec 05 '25 02:12

Derek Litz


1 Answers

This coloring is actually done by ls itself. You can use the LSCOLORS ( on OS X / BSD, or LS_COLORS on Linux) environment variable to customize this. Here is a nifty utility for generating an LSCOLORS value. You can probably Google-about for peoples favored dark-background LSCOLORS values.

Then just set the variable, either in Python:

import os
os.environ['LSCOLORS'] = 'gxfxcxdxbxegedabagacad'

or in your shell session prior to launching IPython (or .bashrc, etc.):

$> export LSCOLORS=gxfxcxdxbxegedabagacad
$> ipython qtconsole

see also: reference docs for LS_COLORS

like image 119
minrk Avatar answered Dec 09 '25 01:12

minrk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!