Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local echo is in white #18

Open
Naohiro2g opened this issue Jan 30, 2021 · 5 comments
Open

local echo is in white #18

Naohiro2g opened this issue Jan 30, 2021 · 5 comments

Comments

@Naohiro2g
Copy link
Contributor

I tried sh_srepl and the connection established successfully but I got no echo back to the terminal.
No, it was there but in white. If I changed the color theme from light to dark, it turned to visible.

It seems the character color for the local echo is hard coded to white.

The target is ESP32 and I'm on macOS Mojave with iterm2 app.

@Carglglz
Copy link
Owner

Hi @Naohiro2g, thanks for reporting this issue.

It seems the character color for the local echo is hard coded to white.

That is true and I didn't realise this wouldn't allow to use a light color theme. 🤦

The target is ESP32 and I'm on macOS Mojave with iterm2 app.

This is actually my setup too.

The prompt style is defined at :

# PROMT SESSION CONFIGURATION

# PROMT SESSION CONFIGURATION

# Style
style_p = Style.from_dict({
    # User input (default text).
    '':          '#ffffff',

    # Prompt.
    'userpath': 'ansimagenta bold',
    'username': 'ansigreen bold',
    'at':       'ansigreen bold',
    'colon':    '#ffffff',
    'pound':    'ansiblue bold',
    'host':     'ansigreen bold',
    'path':     'ansiblue bold',
})

It's the hexadecimal color code under # User input (default text)

I will introduce an option to change the colors in the next release, but for now you could clone the repo and modify it at will 👍 .

@Naohiro2g
Copy link
Contributor Author

Thank you for the confirmation. The setting for colon seems the same. I assume you don't have to specify the attributes then it will fall back to the user settings, right?

upydev wrepl is away from this.
I'm using iTerm2 in VS Code, so it's the same situation as in iTerm2.

@Carglglz
Copy link
Owner

Thank you for the confirmation. The setting for colon seems the same. I assume you don't have to specify the attributes then it will fall back to the user settings, right?

I guess so, but I haven't checked that yet.

upydev wrepl is away from this.
I'm using iTerm2 in VS Code, so it's the same situation as in iTerm2.

Yes for the SHELL-REPLS I'm using a custom prompt to set the colors of the shell and change from shell to repl mode.

For wrepl I only introduced key bindings for custom shortcuts, the prompt is default repl >>> prompt so I guess it follows user settings.

If you are interested this is the library I use for this shell-repl modes : https://python-prompt-toolkit.readthedocs.io/en/master/

@Naohiro2g
Copy link
Contributor Author

Thanks. Custom settings for the prompt is a nice idea and I like it. The green is good in the light theme, too. User input and colon should be in gray or light gray, or remain in colors as defined in the theme.
The python prompt toolkit looks great.

By the way, I'm waiting for my Raspberry Pi Pico coming. Did you get one?
I'm thinking to add REAMDE in Japanese to uPydev for my classes. Or extension for VS Code??

@Carglglz
Copy link
Owner

Custom settings for the prompt is a nice idea and I like it. The green is good in the light theme, too. User input and colon should be in gray or light gray, or remain in colors as defined in the theme.
The python prompt toolkit looks great.

Yes it shouldn't be too difficult to implement a config file for the prompt colors, perhaps something like the upy-config command in the shell-repl mode.

By the way, I'm waiting for my Raspberry Pi Pico coming. Did you get one?

Not yet but I'm planning to do so. 👀

I'm thinking to add REAMDE in Japanese to uPydev for my classes.

Yes, every contribution is welcome. 🎉

Or extension for VS Code??

I don't know how to do that, but I know you can configure a file with keyboard shortcuts to work with the terminal, (for example to upload a script or run code in the device, see HOWTO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants