Permalink
Browse files

Add aurum segment

Closes #127.
  • Loading branch information...
1 parent addb471 commit d3916d32a0975eb9f1fbd5206a7c9130e5471915 @ZyX-I ZyX-I committed with Apr 14, 2012
@@ -66,7 +66,7 @@ let g:Powerline#Colorschemes#default#colorscheme = Pl#Colorscheme#Init([
\ 'i': ['white', 'darkblue', ['bold']],
\ }),
\
- \ Pl#Hi#Segments(['fileinfo.filepath'], {
+ \ Pl#Hi#Segments(['fileinfo.filepath', 'status'], {
\ 'n': ['gray10'],
\ 'N': ['gray5'],
\ 'i': ['mediumcyan'],
@@ -0,0 +1,8 @@
+function! Powerline#Functions#aurum#GetBranch(symbol) " {{{
+ let r = aurum#branch()
+ return empty(r) ? '' : a:symbol .' '. r
+endfunction " }}}
+function! Powerline#Functions#aurum#GetStatus() " {{{
+ let r = aurum#branch()
+ return (empty(r) || r is# 'clean') ? '' : toupper(r[0])
+endfunction " }}}
@@ -0,0 +1,6 @@
+let g:Powerline#Segments#aurum#segments = Pl#Segment#Init(['aurum',
+ \ (exists('*FraworLoad') && FraworLoad('autoload/aurum')),
+ \
+ \ Pl#Segment#Create('branch', '%{Powerline#Functions#aurum#GetBranch("$BRANCH")}'),
+ \ Pl#Segment#Create('status', '%{Powerline#Functions#aurum#GetStatus()}')
+\ ])
@@ -5,6 +5,7 @@ let g:Powerline#Themes#default#theme = Pl#Theme#Create(
\ , 'fugitive:branch'
\ , 'hgrev:branch'
\ , 'fileinfo'
+ \ , 'aurum:status'
\ , 'syntastic:errors'
\ , Pl#Segment#Truncate()
\ , 'cfi:current_function'

0 comments on commit d3916d3

Please sign in to comment.