Skip to content

Set a _really_ transparent background for not squared prompt elements. #2936

@ftpd

Description

@ftpd
Image

What I would like to achieve: show \uE0B6 and \uE0B4 characters with fully transparent background. Relevant parts of my config:

typeset -g POWERLEVEL9K_{LEFT,RIGHT}_LEFT_WHITESPACE='%S\uE0B6%s'
typeset -g POWERLEVEL9K_{LEFT,RIGHT}_RIGHT_WHITESPACE='%S\uE0B4%s'
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=2
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=0
typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=12
typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=0

I fully understand why this happens - I use %S because it's the easiest way to determine the segment's color and since in the segment the foreground is 0 (black), after reverting it becomes the background. I know it's not an issue with p10k per se, but I decided to create this entry to hopefully get some guidance.

I've tried setting POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR to %k \uE0B6, but it obviously inherits the color from the previous segment, and I would like it to match the current one.

BTW. while playing, I observed that changing POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR does nothing. Is it expected? - please ignore, I though it's for the right side of a segment, not right prompt, silly me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions