Bash-it / bash-it

A community Bash framework.
MIT License
14.24k stars 2.29k forks source link

Revert Powerline Theme colors #835

Closed Rockstar04 closed 2 years ago

Rockstar04 commented 7 years ago

It looks like the changes made in #815 modified the colors used for git repo display. In my terminal this displays blue text on a blue background (exact same colors). The changes in #815 seem good for deduplication of code, but the changes to the theme appearance should be reverted in my opinion, or at the very least changed so the text can be read.

I copied the theme that was in place in commit af96da5 and the theme colors are what I expect.

nwinkler commented 7 years ago

@edubxb - want to take a look?

Thanks for reporting this issue, @Rockstar04!

Rockstar04 commented 7 years ago

Here is a screenshot with the current and old powerline themes. I start out with the "Legacy powerline-plain" then switch to the current version.

screenshot_2016-11-14_10-23-03

edubxb commented 7 years ago

I will fix tonight, sorry.

Also, I will add the possibility to overwrite the theme colors.

edubxb commented 7 years ago

@Rockstar04 can you change the theme to the current powerline-plain and open a fresh terminal? how the git segment looks?

The changes introduced in powerline themes updates the background color according to the git repository status, the foreground is the default of the terminal. IMHO this improves readbility.

See how it looks on my terminal: screenshot powerline-plain

Rockstar04 commented 7 years ago

Opening a new terminal did change the text colors, but its not the same as your terminal, and defiantly not the same as what the theme was. If powerline is supposed to be like your screen cap above, I'll keep using the legacy version.

screenshot_2016-11-14_14-11-11

edubxb commented 7 years ago

I my screenshot the username has been removed (by config), in your screenshot, the username background is "orange" (the default is blue) because you have the sudo credentials cached (that can be reset with sudo -k), I guess...

I'm thinking into add more flexibility to the powerline themes:

What do you think about my proposal?

I will try to do it this week...

Rockstar04 commented 7 years ago

If its all intended behavior don't feel like you need to change anything. I'm quite happy with my "legacy" version of the theme. It was just unexpected that a theme would change this drastically and keep the same name.

I'm fine with this being closed, marked up to quarks with my install of Xubuntu.

edubxb commented 7 years ago

You're right, I changed the theme behavior when unifying the powerline themes, I'm so sorry...

But I will try to make everyone happy :yum:

Reverting the powerline-plain theme to the legacy "style" can make the base code of powerline themes a bit more complex, so I prefer to add more complexity adding flexibility, to allow more options to users.

I will made the changes I suggested and you can use the theme as before.

So I will keep this issue open until the changes are made, no worry with that.

Rockstar04 commented 7 years ago

Sounds good. Thanks @edubxb. I'll be watching for the update.

mhite commented 7 years ago

I hit upon the same orange prompt issue and unfortunately sudo -k never made it go away. I'm pretty sure I get a perpetual orange prompt because of the following sudo policy:

# Ops group is allowed ALL
%ops ALL=(ALL) NOPASSWD: ALL

As a quick hack to disable this orange prompt behavior, I placed this on the end of .bashrc after bash_it.sh is sourced.

# Load Bash It
source $BASH_IT/bash_it.sh
export THEME_CHECK_SUDO=false

I think, in general, that the current practice of changing the prompt when "sudo right to elevate without credentials" is available is a bit undesirable in certain cases like the aforementioned.

Perhaps the best path forward is to create a POWERLINE_THEME_CHECK_SUDO option which overrides the default THEME_CHECK_SUDO in the theme? This would at least allow the user to disable this sudo check without having to order it below the source $BASH_IT/bash_it.sh command in .bashrc.

What do you think?

nwinkler commented 7 years ago

Sounds like a good idea to me - you want to take a stab at implementing this?

nwinkler commented 6 years ago

Seems like nobody has picked this up so far. One of you interested in contributing a PR for this, @glats or @mp4096?