0

Using Windows Terminal, I have set a theme for both PowerShell and Ubuntu 20.04 in WSL, but why is that iPython follows the theme for the former, but falls back to a sort of "Breeze" in Linux?

iPython on PowerShell iPython on Ubuntu WSL

I'm sure this is not a problem with the version, since I get a similar result when using an updated iPython on Linux proper, also getting that "default" theme over the terminal's:

iPython on Linux

Why does this happen? How can I make iPython follow my terminal's theme when in Linux environments?


EDIT: including the Windows Terminal profile as requested.

{
    "$schema": "https://aka.ms/terminal-profiles-schema",
    // Add custom actions and keybindings to this array.
    // To unbind a key combination from your defaults.json, set the command to "unbound".
    // To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings
    "actions":
    [
        // Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
        // These two lines additionally bind them to Ctrl+C and Ctrl+V.
        // To learn more about selection, visit https://aka.ms/terminal-selection
        {
            "command":
            {
                "action": "copy",
                "singleLine": false
            },
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "keys": "ctrl+v"
        },
        // Press Ctrl+Shift+F to open the search box
        {
            "command": "find",
            "keys": "ctrl+shift+f"
        },
        // Press Alt+Shift+D to open a new pane.
        // - "split": "auto" makes this pane open in the direction that provides the most surface area.
        // - "splitMode": "duplicate" makes the new pane use the focused pane's profile.
        // To learn more about panes, visit https://aka.ms/terminal-panes
        {
            "command":
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "keys": "alt+shift+d"
        }
    ],
    "alwaysShowTabs": true,
    "copyFormatting": "none",
    "copyOnSelect": true,
    "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
    "initialCols": 150,
    "initialRows": 35,
    "profiles":
    {
        "defaults":
        {
            "fontFace": "Roboto Mono"
        },
        "list":
        [
            {
                "colorScheme": "Spacedust",
                "commandline": "powershell.exe",
                "cursorShape": "filledBox",
                "experimental.retroTerminalEffect": false,
                "fontFace": "Code New Roman",
                "fontSize": 16,
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell",
                "startingDirectory": "%USERPROFILE%",
                "useAcrylic": false
            },
            {
                "colorScheme": "AtelierSulphurpool",
                "commandline": "cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "colorScheme": "Spacedust",
                "cursorShape": "filledBox",
                "fontFace": "MesloLGS NF",
                "fontSize": 15,
                "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
                "hidden": false,
                "name": "Ubuntu-20.04",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "%USERPROFILE%",
                "suppressApplicationTitle": true,
                "tabTitle": "Ubuntu (WSL)"
            }
        ]
    },
    "schemes":
    [
        {
            "background": "#202746",
            "black": "#202746",
            "blue": "#3D8FD1",
            "brightBlack": "#6B7394",
            "brightBlue": "#898EA4",
            "brightCyan": "#9C637A",
            "brightGreen": "#293256",
            "brightPurple": "#DFE2F1",
            "brightRed": "#C76B29",
            "brightWhite": "#F5F7FF",
            "brightYellow": "#5E6687",
            "cursorColor": "#FFFFFF",
            "cyan": "#22A2C9",
            "foreground": "#979DB4",
            "green": "#AC9739",
            "name": "AtelierSulphurpool",
            "purple": "#6679CC",
            "red": "#C94922",
            "selectionBackground": "#FFFFFF",
            "white": "#979DB4",
            "yellow": "#C08B30"
        },
        {
            "background": "#0A1E24",
            "black": "#6E5346",
            "blue": "#0F548B",
            "brightBlack": "#684C31",
            "brightBlue": "#67A0CE",
            "brightCyan": "#83A7B4",
            "brightGreen": "#AECAB8",
            "brightPurple": "#FF8A3A",
            "brightRed": "#FF8A3A",
            "brightWhite": "#FEFFF1",
            "brightYellow": "#FFC878",
            "cursorColor": "#FFFFFF",
            "cyan": "#06AFC7",
            "foreground": "#ECF0C1",
            "green": "#5CAB96",
            "name": "Spacedust",
            "purple": "#E35B00",
            "red": "#E35B00",
            "selectionBackground": "#FFFFFF",
            "white": "#F0F1CE",
            "yellow": "#E3CD7B"
        }
    ],
    "wordDelimiters": " /\\()\"'-.,:;<>~!@#$%^&*|+=[]{}~?\u2502"
}
5
  • What version of Windows Terminal do you have installed exactly?
    – Ramhound
    Commented Jul 12, 2021 at 21:24
  • It's 1.8.1521.0, but should that be relevant? Commented Jul 12, 2021 at 21:34
  • @manielpqueiroz - It certainly is. Can you upgrade to the current version (1.9) and edit your question to include your profile file.
    – Ramhound
    Commented Jul 12, 2021 at 21:52
  • @Ramhound, AFAIK, version 1.9 is still in pre-release and thus only available to "Preview" terminal users (not my case). I'm also led to believe this has to be something with iPython's default configuration files on Linux, since neither the WSL nor the actual Linux versions depicted conform to the respective terminal's theme. Either way, I've updated the question with the profile file. Commented Jul 12, 2021 at 22:36
  • I would replace AtelierSulphurpool with Spacedust for Command Prompt and/or define a iPython profile explicitly
    – Ramhound
    Commented Jul 12, 2021 at 22:53

0

You must log in to answer this question.

Browse other questions tagged .