Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

OS_ICON segment separator issue #921

Closed
vaskark opened this issue Jul 20, 2018 · 7 comments · Fixed by #929
Closed

OS_ICON segment separator issue #921

vaskark opened this issue Jul 20, 2018 · 7 comments · Fixed by #929

Comments

@vaskark
Copy link

vaskark commented Jul 20, 2018

Hi. I'm using the 'os_icon' element and have run into a problem when configuring the foreground and background colours. For example, when I set the colours (as below) I'm not getting the matching colour separator:

POWERLEVEL9K_OS_ICON_BACKGROUND='cyan'
POWERLEVEL9K_OS_ICON_FOREGROUND='black'

cyan

This is also occurring for magenta and black bg colours. All other colours are fine.

Environment:
zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
oh-my-zsh
P9K from git repo
urxvt, gnome-term, tilix

UbuntuMono Nerd Font Mono
POWERLEVEL9K_MODE='nerdfont-complete'
get_icon_names output looks good

Any help would be appreciated.

P.S. I'm also having difficulty setting the fg/bg colours for the user element. Any settings I make in .zshrc are being ignored.

POWERLEVEL9K_USER_FOREGROUND='black'
POWERLEVEL9K_USER_BACKGROUND='green'

@vaskark
Copy link
Author

vaskark commented Jul 20, 2018

Hmm, I just discovered all these other available colours with getColorCode (forgive my n00bness). So using cyan1 or magenta1 seems to work fine.

@dritter
Copy link
Member

dritter commented Jul 20, 2018

Hi @vaskark !
Glad you found a workaround for the problem. But it seems strange anyhow.

For your second problem (user segment not reacting to color changes): You are missing the state here. Please take a look at the wiki.

@vaskark
Copy link
Author

vaskark commented Jul 20, 2018

Hi @dritter. Thanks for responding.

Yeah I found that workaround, although I still encounter the separator problem occasionally with different colours. Oh, well. Didn't know if I was doing something wrong or if it was a bug.

For my user segment, the colours now work. The state I have to set is SUDO; setting DEFAULT has no effect.

Many thanks!

@vaskark
Copy link
Author

vaskark commented Jul 21, 2018

Me again.

So do I have this right ... that no one else is experiencing this problem with separator colours? That it's working as expected for most users?

I'm assuming this works by taking the background colour and then inserting it for the separator colour , a la SVG graphics files. Is this correct? Can anyone guess why it might not always be working for me? Some colours work, some don't.

Thanks.

@dritter
Copy link
Member

dritter commented Jul 23, 2018

Good question. cyan is not in our colors array, but if that happens we just output the color.. We took our color names from here.
For better debugging could you share your config with us?

@dritter
Copy link
Member

dritter commented Jul 23, 2018

Hah! I found it. This is caused indeed if the color is not included in our colors array. What happens is that the color is printed anyway, but we cannot compare it to another color and we default here to black. That is why it looks like that then.
As soon as I add the color to the array, it works as expected..

@bhilburn
Copy link
Member

This is now fixed in master, and the v0.6.6 release will include the fix. Thanks so much!

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

Successfully merging a pull request may close this issue.

3 participants