Closed GhostOps77 closed 11 months ago
You need to pass a Style
to your PromptSession
defining the background-color for the bottom-toolbar
class.
Have a look at the bottom-toolbar.py
example.
The default bottom-toolbar
class sets the reverse
attribute, so you'll need to add noreverse
to your style definition to remove the white background. Setting bg:default
will make the background transparent.
from prompt_toolkit import prompt
from prompt_toolkit.styles import Style
style = Style.from_dict({"bottom-toolbar": "fg:lightblue bg:default noreverse"})
prompt("Input: ", bottom_toolbar="This is a toolbar", style=style)
Thanks! That worked! Closing this issue now
I'm just using the
bottom_toolbar
attribute in thePromptSession
class to generate bottom bar, and by default, it displays text in white background.I used
HTML
class to change the background color of the bottom toolbar, but I can't make the background to be transparent. (I mean, the text background should match the same as with my terminal). But as far as I've seen, I can't anything related to that at all.So, is there anyway where I can get transparent bg for
bottom_toolbar
?