Closed Cadair closed 2 years ago
you can use the below setting for custom fields as well
# these are the default colors and they are configurable.
$PROMPT_FIELD_COLORS = {
"cwd": ("WHITE", "CYAN"),
"gitstatus": ("WHITE", "BLACK"),
"ret_code": ("WHITE", "RED"),
"full_env_name": ("white", "green"),
"hostname": ("white", BLUE),
"localtime": ("#DAF7A6", "black"),
}
Now it is changed to use the prompt fields itself
# the foreground/background colors of the prompt-fields can be configured as below.
# This works for custom fields as well
# The format is `<prompt-field-name>__pl_colors`. It can be a function returning `tuple[str, str]`
# or set tuples directly as below.
$PROMPT_FIELDS["cwd__pl_colors"] = ("WHITE", "CYAN")
Thanks for the responses :)
I think you missed what I was asking for, I would like to change the font colour half way though a field, I have a custom field which returns this:
cadair@laptop
I would like the cadair
and @laptop
parts to have different colours.
Thanks again!
Ok that is not an intended scenario. It considers that each field has the same color and background colour.
Fair enough, thanks again.
Is there a way I am missing or could there be a way to allow customisation of custom fields (either as strings or a python function) which let's you set the colour of parts of a field, i.e. not separated by a powerline separator?
It seems that the built-in
{BACKGROUND_BLACK}
style formatters aren't supported?Thanks a lot for a nice library!