Powerline.el Enhanced

Update: Jan 2013 - There is now a new powerline.el (1.2)

*Note that these enhancements were made to an earlier version, which has been bugfixed. It should be trivial to extract the xpm data / memoization / condition, for a shape you'd like, I'll patch and pull-request at some stage to add these into the latest version...

.... back to the original post.

Powerline is an awesome little enhancement for Emacs, ported over from Vim by an original unknown author Nicolas Rougier and Chen Yuan, you can find the original version at http://emacswiki.org/emacs/powerline.el

I've added a few different xpm shapes as alternatives to the arrows or flatshapes, a rounded or folded corner, and a set of diagonals.

Grab the updated powerline from here: https://gist.github.com/2945235

Put it somewhere in your Emacs load path (e.g. ~/.emacs.d) and add the following lines to the end of your .emacs / init.el - to load it, set the colors and graphic shape:

1
2
3
4
5
6
7
(require 'powerline)
;; colors...
(setq powerline-color1 "#222")      ;; dark grey; 
(setq powerline-color2 "#444")      ;; slightly lighter grey
;; shape...
(setq powerline-arrow-shape 'arrow) ;; mirrored arrows, 
;; see below for the shape options

Shapes

1
(setq powerline-arrow-shape 'arrow)       ;; 18px high arrows

1
(setq powerline-arrow-shape 'arrow14)     ;; 14px high arrows

1
(setq powerline-arrow-shape 'half)        ;; flat

1
(setq powerline-arrow-shape 'percent)     ;; ...? (I have no idea)

1
(setq powerline-arrow-shape 'curve)       ;; scallop curve

New shapes in this version

1
(setq powerline-arrow-shape 'rounded)     ;; new, round corner

1
(setq powerline-arrow-shape 'chamfer)     ;; new, folded corner

1
(setq powerline-arrow-shape 'slant-left)  ;; new, diagonal from left

1
(setq powerline-arrow-shape 'slant-right) ;; new, diagonal from right

1
(setq powerline-arrow-shape 'slant)       ;; mirrored diagonals

Comments

Copyright © 2014 Jason Milkins - Design based on Greyshade by : Shashank Mehta