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

[next] -- fix for colors #703

Merged
merged 4 commits into from Jan 6, 2018
Merged

[next] -- fix for colors #703

merged 4 commits into from Jan 6, 2018

Conversation

Artistan
Copy link
Contributor

terminals do not always render named colors
when using parameter expansion.

  • check if named color renders (dynamic)
  • if not use the colorCode
  • getColorCode executable with (foreground|background) to show example in terminal
  • only 2 places render colors, so it is an easy fix.

#702

@Artistan Artistan changed the title fix for colors [next] -- fix for colors Dec 15, 2017
@Artistan
Copy link
Contributor Author

@bhilburn - this will fix the colors in next.

@bhilburn
Copy link
Member

@Artistan - So sorry for the long response time, here! I've been traveling and such for the holidays. I'm back and ready to get this resolved & merged =)

So, unfortunately, while this PR improves the situation on next, it doesn't completely resolve it for me. This is what I see with this branch:

screen shot 2017-12-29 at 14 11 56

As you can see, it fixed the background color of the history segment, but not for the separator. Thoughts, @Artistan?

@Artistan
Copy link
Contributor Author

Can you post your config or send me a PM?
I can test that out on my setup.

I have also noticed an issue with transparency in iterm2 and the separators not matching the colors either, but I think that is another issue.

@bhilburn
Copy link
Member

@Artistan - You can find my zshrc here: macos-zshrc

I see the issues with both iTerm 3.0.15 and 3.1.5 (latest).

@Artistan
Copy link
Contributor Author

@bhilburn -- looks like the white arrow on the right side is using the foreground color instead of the next color...

@Artistan
Copy link
Contributor Author

another place where the new color functions needed to be used to ensure proper color when using names.

moved to colors functions, because it makes sense.
@Artistan
Copy link
Contributor Author

fix added for issue #711

This was referenced Jan 3, 2018
@bhilburn bhilburn merged commit 0c943ac into Powerlevel9k:next Jan 6, 2018
@bhilburn
Copy link
Member

bhilburn commented Jan 6, 2018

@Artistan - Looks like everything is working as expected! Thanks so much for putting in the time & effort to get this hammered out. I'm really excited about having better color support in P9k =)

This was referenced Jan 6, 2018
@mavam
Copy link

mavam commented Jan 16, 2018

Commit 4d18fdc, which is now in next, introduces the following coloring bug for me:

screen shot 2018-01-16 at 17 57 30

screen shot 2018-01-16 at 17 57 46

Before:
screen shot 2018-01-16 at 17 58 13
screen shot 2018-01-16 at 17 58 06

As can be seen, the background is no longer the right color. I have been working with the color clear in my config a lot, perhaps that's the issue. Here's a snippet:

POWERLEVEL9K_VCS_CLEAN_BACKGROUND="clear"
POWERLEVEL9K_VCS_CLEAN_FOREGROUND="green"
POWERLEVEL9K_VCS_MODIFIED_BACKGROUND="clear"
POWERLEVEL9K_VCS_MODIFIED_FOREGROUND="yellow"
POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND="clear"
POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND="yellow"
POWERLEVEL9K_DIR_HOME_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_FOREGROUND="blue"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="clear"
POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="blue"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_BACKGROUND="clear"
POWERLEVEL9K_DIR_WRITABLE_FORBIDDEN_FOREGROUND="red"
POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="clear"
POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="cyan"
POWERLEVEL9K_ROOT_INDICATOR_BACKGROUND="clear"
POWERLEVEL9K_ROOT_INDICATOR_FOREGROUND="red"
POWERLEVEL9K_STATUS_OK_BACKGROUND="clear"
POWERLEVEL9K_STATUS_OK_FOREGROUND="green"
POWERLEVEL9K_STATUS_ERROR_BACKGROUND="clear"
POWERLEVEL9K_STATUS_ERROR_FOREGROUND="red"
POWERLEVEL9K_TIME_FORMAT="%D{\uf073 %b %d \uf017 %H:%M}" #  Jun 15  09:32
POWERLEVEL9K_TIME_FOREGROUND="blue"
POWERLEVEL9K_TIME_BACKGROUND="clear"
POWERLEVEL9K_TIME_FOREGROUND="blue"
POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND='clear'
POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND='magenta'
POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND='clear'
POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND='magenta'
POWERLEVEL9K_USER_DEFAULT_BACKGROUND='clear'
POWERLEVEL9K_USER_DEFAULT_FOREGROUND='cyan'
POWERLEVEL9K_USER_ROOT_BACKGROUND='clear'
POWERLEVEL9K_USER_ROOT_FOREGROUND='red'
POWERLEVEL9K_USER_ICON="\uf415" # 
POWERLEVEL9K_ROOT_ICON="\u26a1" # ⚡
POWERLEVEL9K_HOST_LOCAL_BACKGROUND='clear'
POWERLEVEL9K_HOST_LOCAL_FOREGROUND='cyan'
POWERLEVEL9K_HOST_REMOTE_BACKGROUND='clear'
POWERLEVEL9K_HOST_REMOTE_FOREGROUND='magenta'
POWERLEVEL9K_HOST_ICON="\uF109 " # 
POWERLEVEL9K_SSH_ICON="\uF489 "  # 
POWERLEVEL9K_OS_ICON_BACKGROUND="clear"
POWERLEVEL9K_OS_ICON_FOREGROUND="grey"

Any guidance on how to keep using next would be appreciated.

(I'm using iTerm 3.1.5 on macOS High Sierra.)

@Artistan
Copy link
Contributor Author

@mavam - can you post your iterm settings also?
image

part of the next updates, is support for the iterm color names/settings...

@mavam
Copy link

mavam commented Jan 17, 2018

@Artistan I'm using a Solarized theme:

screen shot 2018-01-17 at 09 29 40

mavam added a commit to mavam/dotfiles that referenced this pull request Jan 17, 2018
A recently merged pull request caused the background colors to be no
longer transparent. More details at:

  Powerlevel9k/powerlevel9k#703 (comment)
dritter added a commit to dritter/powerlevel9k that referenced this pull request Jun 6, 2018
Conflicts were:
- powerlevel9k.zsh-theme and test/segments/rust_version.spec:
rust_version Segment changed (Powerlevel9k#641) on master and colors got
names (Powerlevel9k#703) on next.
dritter added a commit to dritter/powerlevel9k that referenced this pull request Jun 6, 2018
Conflicts were:
- test/segments/rust_version.spec and powerlevel9k.zsh-theme. Powerlevel9k#826
removes grep from parsing the rust version on next; Powerlevel9k#703 changes color
names.
dritter added a commit to dritter/powerlevel9k that referenced this pull request Jun 6, 2018
Conflicts were:
- test/segments/command_execution_time.spec and
test/segments/go_version.spec: All conflicts come from renaming color
names on next (Powerlevel9k#703) and adding a whitespace to the Visual Identifier
(Powerlevel9k#854) on master.
dritter added a commit to dritter/powerlevel9k that referenced this pull request Jun 6, 2018
Conflicts were:
- test/segments/command_execution_time.spec and
test/segments/go_version.spec: All conflicts come from renaming color
names on next (Powerlevel9k#703) and adding a whitespace to the Visual Identifier
(Powerlevel9k#854) on master.
@dritter dritter mentioned this pull request Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants