Theme colors don't seem to work

182 views
Skip to first unread message

Siddarth Sampangi

unread,
May 31, 2016, 2:37:26 AM5/31/16
to powerline
Updating my config.json file seems to work for all aspects except the color scheme. I've attached an image to illustrate my point, and my config.json to confirm that I haven't made a mistake in there. Changing or customizing the theme of the shell works fine, but I can't seem to get the colors to change. I should note I couldnt find these config files in ~/.config, and am instead editing them directly from ~/.local/lib/python2.7/site-packages/powerline/config_files. I've also confirmed that my terminal supports full 24 bit color.

Thanks,
Sid
Screenshot from 2016-05-30 23-28-43.png
config.json

Nikolay Aleksandrovich Pavlov

unread,
May 31, 2016, 6:56:57 AM5/31/16
to Siddarth Sampangi, powerline
2016-05-31 9:37 GMT+03:00 Siddarth Sampangi <siddarth...@gmail.com>:
> Updating my config.json file seems to work for all aspects except the color
> scheme. I've attached an image to illustrate my point, and my config.json to
> confirm that I haven't made a mistake in there. Changing or customizing the
> theme of the shell works fine, but I can't seem to get the colors to change.

How do you test? Default colorscheme has true colors hex codes
imported from most common xterm 8-bit color palette, so in many cases
there will be *no* changes. Solarized colorscheme gets true colors
from solarized project and if you used to have terminal 4-bit
colorscheme configured to use these colors there again will be no
change. The only difference are color gradients, but all shell themes
does not have any segments with gradients AFAIK.

And in any case you need to restart daemon if you are using it for
changes to make efffect. To actually check whether term_truecolor
works, use `powerline shell left | cat -v`, it will have escape
sequences like `^[[0;38;5;250;48;5;240m` if true color is *not* used
and sequences with four more digits (and AFAIR 2 in place of 5) if it
is.

> I should note I couldnt find these config files in ~/.config, and am instead
> editing them directly from

You are not supposed to find them, if you need to override something
you need to *create* the file. ~/.config/powerline is supposed to have
the same structure as …/config_files.

> ~/.local/lib/python2.7/site-packages/powerline/config_files. I've also
> confirmed that my terminal supports full 24 bit color.
>
> Thanks,
> Sid
>
> --
> You received this message because you are subscribed to the Google Groups
> "powerline" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to powerline-supp...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Siddarth Sampangi

unread,
May 31, 2016, 7:43:21 AM5/31/16
to powerline, siddarth...@gmail.com
How do you test? Default colorscheme has true colors hex codes 
imported from most common xterm 8-bit color palette, so in many cases 
there will be *no* changes. Solarized colorscheme gets true colors 
from solarized project and if you used to have terminal 4-bit 
colorscheme configured to use these colors there again will be no 
change. The only difference are color gradients, but all shell themes 
does not have any segments with gradients AFAIK. 

 I'm not sure I understand what you mean, but if I do, you may be right. I already use the solarized theme for my entire terminal. The reason I'm not sure if its working is because I also see some unexpected behavior: one example is that when I am in a folder that is a git repo, the git branch indicator does not change colors to indicate a clean/dirty branch. It just stays gray, so  my guess was that there was some problem with my theme colors.

And in any case you need to restart daemon if you are using it for 
changes to make efffect. To actually check whether term_truecolor 
works, use `powerline shell left | cat -v`, it will have escape 
sequences like `^[[0;38;5;250;48;5;240m` if true color is *not* used 
and sequences with four more digits (and AFAIR 2 in place of 5) if it 
is. 

Output is:
^[[0;38;2;220;50;47;48;2;7;54;66mM-BM- 04:42M-BM- ^[[0;38;2;7;54;66;48;2;38;139;210;22mM-nM-^BM-0M-BM- ^[[0;38;2;253;246;227;48;2;38;139;210;1msidM-BM- ^[[0;38;2;38;139;210;48;2;88;110;117;22mM-nM-^BM-0M-BM- ^[[0;38;2;238;232;213;48;2;88;110;117m~M-BM- ^[[0;38;2;147;161;161;48;2;88;110;117;22mM-nM-^BM-1M-BM- ^[[0;38;2;238;232;213;48;2;88;110;117mProjectsM-BM- ^[[0;38;2;147;161;161;48;2;88;110;117;22mM-nM-^BM-1M-BM- ^[[0;38;2;238;232;213;48;2;88;110;117msettingsM-BM- ^[[0;38;2;147;161;161;48;2;88;110;117;22mM-nM-^BM-1M-BM- ^[[0;38;2;253;246;227;48;2;88;110;117;1mpowerlineM-BM- ^[[0;38;2;88;110;117;49;22mM-nM-^BM-0M-BM- ^[[0m%

so it looks like term_truecolor works. 

You are not supposed to find them, if you need to override something 
you need to *create* the file. ~/.config/powerline is supposed to have 
the same structure as …/config_files. 
 
Thank you for clarifying this. I now have my config files organized well, and I am able to add a time segment and change its color. If you can help me clarify the git branch issue, then maybe it really is all working.

Siddarth Sampangi

unread,
May 31, 2016, 8:06:04 AM5/31/16
to powerline, siddarth...@gmail.com
I just noticed that the git colors are turned off by default and that I need to turn them on. Sorry about that.

Chetan Nadgouda

unread,
Jun 23, 2017, 7:32:38 PM6/23/17
to powerline, siddarth...@gmail.com
How did you do that? I am trying to get this working and am still struggling with it.
This is what I did (please forgive the boxes. They are special characters by powerline)

cnadgouda  …  powerline  themes  shell  more config.json
{
    "function": "powerline_gitstatus.gitstatus(status_colors=True)",
    "priority": 40
}
 cnadgouda  …  powerline  themes  shell  more default.json
{
    "function": "powerline_gitstatus.gitstatus(status_colors=True)",
    "priority": 40
}
 cnadgouda  …  powerline  themes  shell 

Nikolay Aleksandrovich Pavlov

unread,
Jun 24, 2017, 5:20:52 AM6/24/17
to Chetan Nadgouda, powerline, Siddarth Sampangi
Did you read the README for powerline-gitstatus? It clearly indicates
how to supply arguments and it is not in function, it is in args.

Nikolay Aleksandrovich Pavlov

unread,
Jun 24, 2017, 5:23:29 AM6/24/17
to Chetan Nadgouda, powerline, Siddarth Sampangi
And see existing examples in the powerline repository,
/powerline/config_files/themes/shell (actually you need to copy them
from there). There is no way your config will do anything useful if
what you show is the whole file.

2017-06-24 2:32 GMT+03:00 Chetan Nadgouda <chetan....@gmail.com>:
Reply all
Reply to author
Forward
0 new messages