Permalink
Browse files

Add skwp-Solarized Theme

Theme based on Solarized and Powerline default.

Closes #55.
Closes #122.
  • Loading branch information...
1 parent a413b26 commit a1e327fa79030fbd12efc264e8be2fa3e8d8a753 @skwp skwp committed with Apr 30, 2012
Showing with 308 additions and 0 deletions.
  1. +192 −0 autoload/Powerline/Colorschemes/skwp.vim
  2. +116 −0 autoload/Powerline/Themes/skwp.vim
@@ -0,0 +1,192 @@
+" This theme is based on Solarized-dark colors, combined
+" with Powerline native colors
+call Pl#Hi#Allocate({
+ \ 'black' : 16,
+ \ 'white' : 231,
+ \
+ \ 'darkestgreen' : 22,
+ \ 'darkgreen' : 28,
+ \ 'mediumgreen' : 70,
+ \ 'brightgreen' : 148,
+ \
+ \ 'darkestcyan' : 23,
+ \ 'mediumcyan' : 117,
+ \
+ \ 'darkestblue' : 24,
+ \ 'darkblue' : 31,
+ \
+ \ 'darkestred' : 52,
+ \ 'darkred' : 88,
+ \ 'mediumred' : 124,
+ \ 'brightred' : 160,
+ \ 'brightestred' : 196,
+ \
+ \ 'darkestpurple' : 55,
+ \ 'mediumpurple' : 98,
+ \ 'brightpurple' : 189,
+ \
+ \ 'brightorange' : 208,
+ \ 'brightestorange': 214,
+ \
+ \ 'gray0' : 233,
+ \ 'gray1' : 235,
+ \ 'gray2' : 236,
+ \ 'gray3' : 239,
+ \ 'gray4' : 240,
+ \ 'gray5' : 241,
+ \ 'gray6' : 244,
+ \ 'gray7' : 245,
+ \ 'gray8' : 247,
+ \ 'gray9' : 250,
+ \ 'gray10' : 252,
+ \
+ \ 'base00' : [241, 0x657b83],
+ \ 'base01' : [240, 0x586e75],
+ \ 'base02' : [0, 0x073642],
+ \ 'base03' : [234, 0x002b36],
+ \ 'base0' : [244, 0x839496],
+ \ 'base1' : [245, 0x93a1a1],
+ \ 'base2' : [254, 0xeee8d5],
+ \ 'base3' : [230, 0xfdf6e3],
+ \ 'yellow' : [136, 0xb58900],
+ \ 'orange' : [166, 0xcb4b16],
+ \ 'red' : [160, 0xdc322f],
+ \ 'magenta' : [125, 0xd33682],
+ \ 'violet' : [61, 0x6c71c4],
+ \ 'blue' : [33, 0x268bd2],
+ \ 'cyan' : [37, 0x2aa198],
+ \ 'green' : [64, 0x859900],
+ \ })
+
+let g:Powerline#Colorschemes#skwp#colorscheme = Pl#Colorscheme#Init([
+ \ Pl#Hi#Segments(['SPLIT'], {
+ \ 'n': ['white', 'base02'],
+ \ 'N': ['white', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['mode_indicator'], {
+ \ 'n': ['darkestgreen', 'brightgreen', ['bold']],
+ \ 'i': ['darkestcyan', 'white', ['bold']],
+ \ 'v': ['red', 'brightorange', ['bold']],
+ \ 'r': ['white', 'violet', ['bold']],
+ \ 's': ['white', 'gray5', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['branch', 'raw', 'filesize'], {
+ \ 'n': ['base03', 'blue'],
+ \ 'N': ['gray5', 'base03'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['scrollpercent'], {
+ \ 'n': ['gray7', 'gray2'],
+ \ 'N': ['base2', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['fileinfo', 'filename', 'filepath'], {
+ \ 'n': ['base2', 'darkestblue', ['bold']],
+ \ 'N': ['base1', 'base02', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['fileinfo.filepath'], {
+ \ 'n': ['gray10'],
+ \ 'N': ['gray5'],
+ \ 'i': ['mediumcyan'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['static_str'], {
+ \ 'n': ['base3', 'violet'],
+ \ 'N': ['base1', 'base02'],
+ \ 'i': ['white', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['fileinfo.flags'], {
+ \ 'n': ['base03', ['bold']],
+ \ 'N': ['gray5'],
+ \ 'i': ['base03', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['current_function', 'fileformat', 'fileencoding', 'pwd', 'filetype', 'rvm:string', 'rvm:statusline', 'virtualenv:statusline', 'charcode', 'currhigroup'], {
+ \ 'n': ['gray5', 'gray2'],
+ \ 'i': ['mediumcyan', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['lineinfo'], {
+ \ 'n': ['gray2', 'gray10', ['bold']],
+ \ 'N': ['gray7', 'gray1', ['bold']],
+ \ 'i': ['darkestcyan', 'mediumcyan', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['errors'], {
+ \ 'n': ['orange', 'base02', ['bold']],
+ \ 'N': ['gray5', 'base03', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['lineinfo.line.tot'], {
+ \ 'n': ['gray6'],
+ \ 'N': ['gray5'],
+ \ 'i': ['darkestcyan'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['paste_indicator', 'ws_marker'], {
+ \ 'n': ['base3', 'red', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['gundo:static_str.name', 'command_t:static_str.name'], {
+ \ 'n': ['base3', 'darkblue', ['bold']],
+ \ 'N': ['base1', 'base03', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['gundo:static_str.buffer', 'command_t:raw.line'], {
+ \ 'n': ['white', 'base02'],
+ \ 'N': ['gray5', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['gundo:SPLIT', 'command_t:SPLIT'], {
+ \ 'n': ['white', 'base02'],
+ \ 'N': ['white', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['lustyexplorer:static_str.name', 'minibufexplorer:static_str.name', 'nerdtree:raw.name', 'tagbar:static_str.name'], {
+ \ 'n': ['gray10', 'darkestblue', ['bold']],
+ \ 'N': ['gray3', 'base02', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['lustyexplorer:static_str.buffer', 'tagbar:static_str.buffer'], {
+ \ 'n': ['base3', 'blue'],
+ \ 'N': ['gray5', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['lustyexplorer:SPLIT', 'minibufexplorer:SPLIT', 'nerdtree:SPLIT', 'tagbar:SPLIT'], {
+ \ 'n': ['gray3', 'base02'],
+ \ 'N': ['gray3', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:focus', 'ctrlp:byfname'], {
+ \ 'n': ['green', 'base03'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:prev', 'ctrlp:next', 'ctrlp:pwd'], {
+ \ 'n': ['green', 'base02'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:item'], {
+ \ 'n': ['base2', 'darkestblue', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:marked'], {
+ \ 'n': ['brightgreen', 'base03', ['bold']],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:count'], {
+ \ 'n': ['base0', 'base03'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['ctrlp:SPLIT'], {
+ \ 'n': ['white', 'base03'],
+ \ }),
+ \
+ \ Pl#Hi#Segments(['status'], {
+ \ 'n': ['green', 'base02'],
+ \ 'N': ['gray5', 'base02'],
+ \ }),
+\ ])
@@ -0,0 +1,116 @@
+" Disabled:
+" Add the following line into the first theme group to see the highlight
+" group
+" \ , 'currhigroup'
+"
+" Line info taken out - I know which line number I'm on from the gutter
+"\ , 'lineinfo'
+let g:Powerline#Themes#skwp#theme = Pl#Theme#Create(
+ \ Pl#Theme#Buffer(''
+ \ , 'fugitive:branch'
+ \ , 'fileinfo'
+ \ , 'flags.mod'
+ \ , 'syntastic:errors'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'sass:status'
+ \ , 'rvm:string'
+ \ , 'paste_indicator'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('command_t'
+ \ , ['static_str.name', 'Command-T']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , ['raw.line', '%10(Match #%l%)']
+ \ ),
+ \
+ \ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_tree')
+ \ , ['static_str.name', 'Gundo']
+ \ , ['static_str.buffer', 'Undo tree']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('gundo', Pl#Match#Any('gundo_preview')
+ \ , ['static_str.name', 'Gundo']
+ \ , ['static_str.buffer', 'Diff preview']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ft_help'
+ \ , ['static_str.name', 'Help']
+ \ , 'filename'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'scrollpercent'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ft_vimpager'
+ \ , ['static_str.name', 'Pager']
+ \ , 'filename'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'scrollpercent'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('lustyexplorer'
+ \ , ['static_str.name', 'LustyExplorer']
+ \ , ['static_str.buffer', 'Buffer list']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ft_man'
+ \ , ['static_str.name', 'Man page']
+ \ , 'filename'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'scrollpercent'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('minibufexplorer'
+ \ , ['static_str.name', 'MiniBufExplorer']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ft_qf'
+ \ , ['static_str.name', 'Quickfix']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('tagbar'
+ \ , ['static_str.name', 'Tagbar']
+ \ , ['static_str.buffer', 'Tree']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_main', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.main = "%s"')
+ \ , 'ctrlp:prev'
+ \ , 'ctrlp:item'
+ \ , 'ctrlp:next'
+ \ , 'ctrlp:marked'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'ctrlp:focus'
+ \ , 'ctrlp:byfname'
+ \ , 'pwd'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('ctrlp', Pl#Theme#Callback('ctrlp_prog', 'if ! exists("g:ctrlp_status_func") | let g:ctrlp_status_func = {} | endif | let g:ctrlp_status_func.prog = "%s"')
+ \ , 'ctrlp:count'
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ , 'pwd'
+ \ ),
+ \
+ \ Pl#Theme#Buffer('nerdtree'
+ \ , ['raw.name', '%{Powerline#Functions#GetShortPath(4)}']
+ \ , Pl#Segment#Truncate()
+ \ , Pl#Segment#Split()
+ \ )
+\ )

8 comments on commit a1e327f

Contributor

skwp replied May 7, 2012

Not sure what happened but when I try to use your merged version of this, my buffers all prefixed with the "Help" static name segment instead of the git integration :/

It could be some other thing that happened in the main dev line

My version:
http://postimage.org/image/cfgrys1c1/

Your version:
http://postimage.org/image/wlfojx7lt/

Owner

Lokaltog replied May 7, 2012

That's strange. I'm not able to reproduce this issue, can you explain what you do to trigger this? Have you tried clearing the cache file?

Contributor

skwp replied May 7, 2012

Definitely cleared the cache, and switched back and forth between my develop branch and yours and see this difference. All I do is open up vim and open any file, it's all prefixed with Help in your develop branch. If you can't reproduce I'll probably dig into this myself later ..

Contributor

jlamontagne replied May 14, 2012

The "Help" prefix issue is fixed in #141.

Contributor

skwp replied Jun 7, 2012

Hi @Lokaltog I'd really like to go back to using your official branch for my YADR () project, but it appears that when you merged my theme, you dropped the sass:status segment from the color scheme, which makes it not show up. I'm wondering if that was intentional, and if so, what I can do to still make it work. I'm not sure if it's possible to add to color schemes from outside (after it is loaded), because I'd be happy to do so in a post-initialize vim script. Or maybe this was an oversight

Please see my original implementation here:
https://github.com/skwp/vim-powerline/blob/develop/autoload/Powerline/Colorschemes/skwp.vim#L188

vs your version:
https://github.com/Lokaltog/vim-powerline/blob/develop/autoload/Powerline/Colorschemes/skwp.vim#L188

Thanks!

Owner

Lokaltog replied Jun 11, 2012

If I remember correctly I did this to make a "general status color" instead of one specific to your plugin. It shouldn't matter, as the sass:status segment should fallback to status automatically.

Contributor

skwp replied Jun 11, 2012

Hmm well for some reason it's not showing up visually.. :/
I'm keeping to my branch for now until I have time to debug why the modified version doesn't show up

Owner

Lokaltog replied Jun 11, 2012

I'll check this out later and try to find a solution.

Please sign in to comment.