santagada / xontrib-powerline

Powerline for Xonsh shell
MIT License
49 stars 20 forks source link

color overrides? #10

Closed sejktmcsdlmfhsc closed 7 years ago

sejktmcsdlmfhsc commented 7 years ago

@santagada just an idea: I like 0.4 quite a lot - thank you!! one other thing that would be nice to have: if it was possible to override the color settings of the Section named tuples from .xonshrc. currently I hardcode my color settings into powerline xsh. best, sej

santagada commented 7 years ago

I was feeling lazy because I kinda hardcoded the colors on the sections themselves but you are right, besides the ones on branches and errors that have a particular color, everything else could be custom. Do you have an idea if color styles or actually configuring the colors one by one would be better, and can you share your colors with me (maybe they will be the new default).

sejktmcsdlmfhsc commented 7 years ago

Color styles sound like a nice but maybe more advanced feature - for me personally it would be already great if I could just overwrite the bg/fg color pairs of pl from .xonshrc via a variable or dict. Yes I will share my colors as soon as I am happy with my settings, although I find your grey scale preset really decent [assuming a white term bg] - it just was not as readable with my all dark theming.. By the way I really like the pl_* functions made available!!

sejktmcsdlmfhsc commented 7 years ago

hi @santagada, below is a proposal for the color scheme that I use in dark themed shells. I put it all in one dict and unpacked it in powerline.xsh at the according functions like:

*$PL_COLORS["short_cwd"]

the one thing, that is not so nice is, that "cwd" contains the curly braces, since I integrated the colors this way: (I'm sure this can be done better, so all color tuples are formatted the same)

ps[ni] = '{0}{1}{2}'.format($PL_COLORS["cwd"][0],ps[ni], $PL_COLORS["cwd"][1])

..and here the colors dict:

$PL_COLORS = {"time": ("BLACK", "#00adee"),
              "who": ("BLACK", "#666666"),
              "short_cwd": ("BLACK", "#50a0a0"),
              "cwd": ("{#00adee}", "{WHITE}"),
              "history": ("WHITE", "#333333"),
              "venv": ("BLACK", "INTENSE_GREEN"),
              }
sejktmcsdlmfhsc commented 7 years ago

see proposal in #11

vaaaaanquish commented 4 years ago

@sejktmcsdlmfhsc @santagada Why did we close this issue? I think it ’s a great suggestion...