Open unode opened 6 years ago
Actually I correct my previous post. %colors
(e.g %colors Linux
) seems to have no effect in jupyter-console - 5.2.0
, so there seems to be a problem here too.
There are two sources of colours
help?
output are produced by the kernel, so %colors
and IPython config should affect these.I was able to change the colors and font by launching the Developer Console and typing:
terminal.term.setOption('fontFamily', 'Fira Code');
terminal.term.setOption('theme', {
foreground: '#d4d4d4',
background: '#2d2d2d',
black: '#646464',
brightBlack: '#646464',
red: '#f58e8e',
brightRed: '#f58e8e',
green: '#a9d3ab',
brightGreen: '#a9d3ab',
yellow: '#fed37e',
brightYellow: '#fed37e',
blue: '#7aabd4',
brightBlue: '#7aabd4',
magenta: '#d6add5',
brightMagenta: '#d6add5',
cyan: '#79d4d5',
brightCyan: '#79d4d5',
white: '#d4d4d4',
brightWhite: '#d4d4d4',
});
I was also able to hide the scrollbar by replacing the overflow-y: scroll
with overflow-y: hidden
style from .terminal .xterm
CSS class. See the screenshot below:
I'm willing to create a PR to enable these options in the Jupyter Console configuration, but I need some time understanding how to do this as I've never worked with Jupyter Extensions. If anyone can give me any hints, I'll be very happy :smile:
I was able to change the colors and font by launching the Developer Console and typing:
terminal.term.setOption('fontFamily', 'Fira Code'); terminal.term.setOption('theme', { foreground: '#d4d4d4', background: '#2d2d2d', black: '#646464', brightBlack: '#646464', red: '#f58e8e', brightRed: '#f58e8e', green: '#a9d3ab', brightGreen: '#a9d3ab', yellow: '#fed37e', brightYellow: '#fed37e', blue: '#7aabd4', brightBlue: '#7aabd4', magenta: '#d6add5', brightMagenta: '#d6add5', cyan: '#79d4d5', brightCyan: '#79d4d5', white: '#d4d4d4', brightWhite: '#d4d4d4', });
I was also able to hide the scrollbar by replacing the
overflow-y: scroll
withoverflow-y: hidden
style from.terminal .xterm
CSS class. See the screenshot below:I'm willing to create a PR to enable these options in the Jupyter Console configuration, but I need some time understanding how to do this as I've never worked with Jupyter Extensions. If anyone can give me any hints, I'll be very happy 😄
Hi, I want to change the color of jupyter terminal page , and your picture shows
terminal.term.setOption('fontFamily', 'Fira Code');
Hi, I'm looking for a way to change the jupyter terminal page's color and font, luckily, I found this issue and your picture's url seems to be jupyter terminal page, I tried your code in jupyter console and terminal , both failed, could you please tell me how to do that please? Thanks
Just for reference, this jupyter_console
repository is for a Jupyter frontend that runs in a terminal. It's nothing to do with the HTML terminal you can get as part of the Jupyter Notebook interface. That is implemented by xtermjs, and integrated into Jupyter in the jupyter/notebook repo.
Just for reference, this
jupyter_console
repository is for a Jupyter frontend that runs in a terminal. It's nothing to do with the HTML terminal you can get as part of the Jupyter Notebook interface. That is implemented by xtermjs, and integrated into Jupyter in the jupyter/notebook repo.
Thank you for the infomation, I have already done.
The only config I found for the prompt colors is ZMQTerminalInteractiveShell.true_color
, but there’s none to set it to 8 colors. The green it uses clashes with my terminal background, prompts are near invisible.
Ah, so I need to override this:
# ~/.ipython/profile_default/ipython_config.py
from pygments.token import Token
c = get_config()
c.TerminalInteractiveShell.highlighting_style_overrides = {
Token.Prompt: '#ansigreen',
Token.PromptNum: '#ansidarkgreen bold',
Token.OutPrompt: '#ansired',
Token.OutPromptNum: '#ansidarkred bold',
}
Why is this not the default?
References:
I'm finding that in Jupyter Console 6.1.0 (IPython 7.12.0, Python 3.7.6), c.TerminalInteractiveShell.highlighting_style_overrides
(as suggested by the auto-generated ipython_config.py
) is not being picked up by ZMQTerminalInteractiveShell
. Using c.ZMQTerminalInteractiveShell
doesn't work either. It seems like the entire configurability of ZMQTerminalInteractiveShell
is broken.
Ipython has
c.InteractiveShell.colors
and%colors
.With
jupyter-console
only%colors
seems to be available. This option seems to have existed in jupyter console 4.0.1 but not on the latest.Otherwise the only reference I've managed to find so far on google groups mentions its use but with a different goal:
--simple-prompt
.With that said, is there any way to configure
jupyter-console
to always use a given colorscheme?