python icon indicating copy to clipboard operation
python copied to clipboard

Using with IPython 9.x

Open Alex-Muirhead opened this issue 6 months ago • 2 comments

The release of IPython 9.0.0 came with a rewrite to the theming, and deprecates the c.TerminalInteractiveShell.highlighting_style setting. I don't quite understand how to customise the new theming yet, but it would be good to work this out and update the README. If anyone has any solutions, I'd very much appreciate it.

Alex-Muirhead avatar Jun 25 '25 00:06 Alex-Muirhead

Hey, I stumbled upon this answer which I think solved it. Here's what worked for me:

from IPython.utils.PyColorize import linux_theme, theme_table
from copy import deepcopy

theme = deepcopy(linux_theme)

# Choose catppuccin theme
catppuccin_theme = "catppuccin-mocha"
# catppuccin_theme = "catppuccin-macchiato"
# catppuccin_theme = "catppuccin-frappe"
# catppuccin_theme = "catppuccin-latte"

theme.base = catppuccin_theme
theme_table[catppuccin_theme] = theme

c = get_config()
c.TerminalInteractiveShell.true_color = True
c.TerminalInteractiveShell.colors = catppuccin_theme

frogpal avatar Jul 24 '25 17:07 frogpal

works here, thank you bro

youssefadly237 avatar Jul 31 '25 03:07 youssefadly237