Switch to powerline SML theme

This commit is contained in:
Gergely Polonkai 2016-09-26 17:10:08 +02:00
parent 5f443900d7
commit 81fa5f639d
10 changed files with 1822 additions and 3 deletions

View File

@ -0,0 +1,86 @@
;;; powerline-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "powerline" "powerline.el" (22505 14729 850040
;;;;;; 880000))
;;; Generated autoloads from powerline.el
(autoload 'powerline-hud "powerline" "\
Return an XPM of relative buffer location using FACE1 and FACE2 of optional WIDTH.
\(fn FACE1 FACE2 &optional WIDTH)" nil nil)
(autoload 'powerline-mouse "powerline" "\
Return mouse handler for CLICK-GROUP given CLICK-TYPE and STRING.
\(fn CLICK-GROUP CLICK-TYPE STRING)" nil nil)
(autoload 'powerline-concat "powerline" "\
Concatonate STRINGS and pad sides by spaces.
\(fn &rest STRINGS)" nil nil)
(autoload 'defpowerline "powerline" "\
Create function NAME by wrapping BODY with powerline padding an propetization.
\(fn NAME BODY)" nil t)
(autoload 'powerline-raw "powerline" "\
Render STR as mode-line data using FACE and optionally PAD import on left (l) or right (r).
\(fn STR &optional FACE PAD)" nil nil)
(autoload 'powerline-fill "powerline" "\
Return empty space using FACE and leaving RESERVE space on the right.
\(fn FACE RESERVE)" nil nil)
(autoload 'powerline-major-mode "powerline")
(autoload 'powerline-minor-modes "powerline")
(autoload 'powerline-narrow "powerline")
(autoload 'powerline-vc "powerline")
(autoload 'powerline-buffer-size "powerline")
(autoload 'powerline-buffer-id "powerline")
(autoload 'powerline-process "powerline")
(autoload 'powerline-selected-window-active "powerline")
;;;***
;;;### (autoloads nil "powerline-themes" "powerline-themes.el" (22505
;;;;;; 14729 822040 906000))
;;; Generated autoloads from powerline-themes.el
(autoload 'powerline-default-theme "powerline-themes" "\
Setup the default mode-line.
\(fn)" t nil)
(autoload 'powerline-center-theme "powerline-themes" "\
Setup a mode-line with major and minor modes centered.
\(fn)" t nil)
(autoload 'powerline-vim-theme "powerline-themes" "\
Setup a Vim-like mode-line.
\(fn)" t nil)
(autoload 'powerline-nano-theme "powerline-themes" "\
Setup a nano-like mode-line.
\(fn)" t nil)
;;;***
;;;### (autoloads nil nil ("powerline-pkg.el" "powerline-separators.el")
;;;;;; (22505 14729 838040 890000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; powerline-autoloads.el ends here

View File

@ -0,0 +1,7 @@
(define-package "powerline" "20160702.1931" "Rewrite of Powerline"
'((cl-lib "0.2"))
:url "http://github.com/milkypostman/powerline/" :keywords
'("mode-line"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -0,0 +1,594 @@
;;; powerline-separators.el --- Separators for Powerline
;; Copyright (C) 2012-2013 Donald Ephraim Curtis
;; Copyright (C) 2013 Jason Milkins
;; Copyright (C) 2012 Nicolas Rougier
;;; Commentary:
;;
;; Separators for Powerline.
;; Included separators: alternate, arrow, arrow-fade, bar, box, brace, butt,
;; chamfer, contour, curve, rounded, roundstub, slant, wave, zigzag, and nil.
;;
;;; Code:
(require 'cl-lib)
(require 'color)
(defun pl/interpolate (color1 color2)
"Interpolate between COLOR1 and COLOR2.
COLOR1 and COLOR2 must be supplied as hex strings with a leading #."
(let* ((c1 (color-name-to-rgb color1))
(c2 (color-name-to-rgb color2))
(red (/ (+ (nth 0 c1) (nth 0 c2)) 2))
(green (/ (+ (nth 1 c1) (nth 1 c2)) 2))
(blue (/ (+ (nth 2 c1) (nth 2 c2)) 2)))
(color-rgb-to-hex red green blue)))
(defun pl/hex-color (color)
"Get the hexadecimal value of COLOR."
(when color
(apply 'color-rgb-to-hex (color-name-to-rgb color))))
(defun pl/pattern (lst)
"Turn LST into an infinite pattern."
(when lst
(let ((pattern (cl-copy-list lst)))
(setcdr (last pattern) pattern))))
(defun pl/pattern-to-string (pattern)
"Convert a PATTERN into a string that can be used in an XPM."
(concat "\"" (mapconcat 'number-to-string pattern "") "\","))
(defun pl/reverse-pattern (pattern)
"Reverse each line in PATTERN."
(mapcar 'reverse pattern))
(defun pl/row-pattern (fill total &optional fade)
"Make a list that has FILL 0s out of TOTAL 1s with FADE 2s to the right of the fill."
(unless fade
(setq fade 0))
(let ((fill (min fill total))
(fade (min fade (max (- total fill) 0))))
(append (make-list fill 0)
(make-list fade 2)
(make-list (- total fill fade) 1))))
(defun pl/pattern-bindings-body (patterns height-exp pattern-height-sym
second-pattern-height-sym)
"Create let-var bindings and a function body from PATTERNS.
The `car' and `cdr' parts of the result can be passed to the
function `pl/wrap-defun' as its `let-vars' and `body' arguments,
respectively. HEIGHT-EXP is an expression calculating the image
height and it should contain a free variable `height'.
PATTERN-HEIGHT-SYM and SECOND-PATTERN-HEIGHT-SYM are symbols used
for let-var binding variables."
(let* ((pattern (pl/pattern (mapcar 'pl/pattern-to-string (car patterns))))
(header (mapcar 'pl/pattern-to-string (nth 1 patterns)))
(footer (mapcar 'pl/pattern-to-string (nth 2 patterns)))
(second-pattern (pl/pattern (mapcar 'pl/pattern-to-string (nth 3 patterns))))
(center (mapcar 'pl/pattern-to-string (nth 4 patterns)))
(reserve (+ (length header) (length footer) (length center))))
(when pattern
(cons `((,pattern-height-sym (max (- ,height-exp ,reserve) 0))
(,second-pattern-height-sym (/ ,pattern-height-sym 2))
(,pattern-height-sym ,(if second-pattern `(ceiling ,pattern-height-sym 2) `,pattern-height-sym)))
(list (when header `(mapconcat 'identity ',header ""))
`(mapconcat 'identity
(cl-subseq ',pattern 0 ,pattern-height-sym) "")
(when center `(mapconcat 'identity ',center ""))
(when second-pattern
`(mapconcat 'identity
(cl-subseq ',second-pattern
0 ,second-pattern-height-sym) ""))
(when footer `(mapconcat 'identity ',footer "")))))))
(defun pl/pattern-defun (name dir width &rest patterns)
"Create a powerline function of NAME in DIR with WIDTH for PATTERNS.
PATTERNS is of the form (PATTERN HEADER FOOTER SECOND-PATTERN CENTER
PATTERN-2X HEADER-2X FOOTER-2X SECOND-PATTERN-2X CENTER-2X).
PATTERN is required, all other components are optional.
The first 5 components are for the standard resolution image.
The remaining ones are for the high resolution image where both
width and height are doubled. If PATTERN-2X is nil or not given,
then the remaining components are ignored and the standard
resolution image with magnification and interpolation will be
used in high resolution environments
All generated functions generate the form:
HEADER
PATTERN ...
CENTER
SECOND-PATTERN ...
FOOTER
PATTERN and SECOND-PATTERN repeat infinitely to fill the space needed to generate a full height XPM.
PATTERN, HEADER, FOOTER, SECOND-PATTERN, CENTER are of the form ((COLOR ...) (COLOR ...) ...).
COLOR can be one of 0, 1, or 2, where 0 is the source color, 1 is the
destination color, and 2 is the interpolated color between 0 and 1."
(when (eq dir 'right)
(setq patterns (mapcar 'pl/reverse-pattern patterns)))
(let ((bindings-body (pl/pattern-bindings-body patterns
'height
'pattern-height
'second-pattern-height))
(bindings-body-2x (pl/pattern-bindings-body (nthcdr 5 patterns)
'(* height 2)
'pattern-height-2x
'second-pattern-height-2x)))
(pl/wrap-defun name dir width
(append (car bindings-body) (car bindings-body-2x))
(cdr bindings-body) (cdr bindings-body-2x))))
(defun pl/background-color (face)
(face-attribute face
(if (face-attribute face :inverse-video nil 'default)
:foreground
:background)
nil
'default))
(defun pl/wrap-defun (name dir width let-vars body &optional body-2x)
"Generate a powerline function of NAME in DIR with WIDTH using LET-VARS and BODY."
(let* ((src-face (if (eq dir 'left) 'face1 'face2))
(dst-face (if (eq dir 'left) 'face2 'face1)))
`(defun ,(intern (format "powerline-%s-%s" name (symbol-name dir)))
(face1 face2 &optional height)
(when window-system
(unless height (setq height (pl/separator-height)))
(let* ,(append `((color1 (when ,src-face
(pl/hex-color (pl/background-color ,src-face))))
(color2 (when ,dst-face
(pl/hex-color (pl/background-color ,dst-face))))
(colori (when (and color1 color2) (pl/interpolate color1 color2)))
(color1 (or color1 "None"))
(color2 (or color2 "None"))
(colori (or colori "None")))
let-vars)
(apply 'create-image
,(append `(concat (format "/* XPM */ static char * %s_%s[] = { \"%s %s 3 1\", \"0 c %s\", \"1 c %s\", \"2 c %s\","
,(replace-regexp-in-string "-" "_" name)
(symbol-name ',dir)
,width
height
color1
color2
colori))
body
'("};"))
'xpm t
:ascent 'center
:face (when (and face1 face2)
,dst-face)
,(and body-2x
`(and (featurep 'mac)
(list :data-2x
,(append `(concat (format "/* XPM */ static char * %s_%s_2x[] = { \"%s %s 3 1\", \"0 c %s\", \"1 c %s\", \"2 c %s\","
,(replace-regexp-in-string "-" "_" name)
(symbol-name ',dir)
(* ,width 2)
(* height 2)
color1
color2
colori))
body-2x
'("};")))))))))))
(defmacro pl/alternate (dir)
"Generate an alternating pattern XPM function for DIR."
(pl/pattern-defun "alternate" dir 4
'((2 2 1 1)
(0 0 2 2))
nil nil nil nil
;; 2x
'((2 2 2 2 1 1 1 1)
(2 2 2 2 1 1 1 1)
(0 0 0 0 2 2 2 2)
(0 0 0 0 2 2 2 2))))
(defmacro pl/arrow (dir)
"Generate an arrow XPM function for DIR."
(let ((row-modifier (if (eq dir 'left) 'identity 'reverse)))
(pl/wrap-defun "arrow" dir 'middle-width
'((width (1- (/ height 2)))
(middle-width (1- (ceiling height 2))))
`((cl-loop for i from 0 to width
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i middle-width))))
(when (cl-oddp height)
(pl/pattern-to-string (make-list middle-width 0)))
(cl-loop for i from width downto 0
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i middle-width)))))
`((when (cl-evenp height)
(pl/pattern-to-string (make-list (* middle-width 2) 1)))
(cl-loop for i from 0 to (* middle-width 2)
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i (* middle-width 2)))))
(cl-loop for i from (* middle-width 2) downto 0
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i (* middle-width 2)))))
(when (cl-evenp height)
(pl/pattern-to-string (make-list (* middle-width 2) 1)))))))
(defmacro pl/arrow-fade (dir)
"Generate an arrow-fade XPM function for DIR."
(let* ((row-modifier (if (eq dir 'left) 'identity 'reverse)))
(pl/wrap-defun "arrow-fade" dir 'middle-width
'((width (1- (/ height 2)))
(middle-width (1+ (ceiling height 2))))
`((cl-loop for i from 0 to width
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i middle-width 2))))
(when (cl-oddp height)
(pl/pattern-to-string (,row-modifier (pl/row-pattern (1+ width) middle-width 2))))
(cl-loop for i from width downto 0
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i middle-width 2)))))
`((when (cl-evenp height)
(pl/pattern-to-string (,row-modifier (pl/row-pattern 0 (* middle-width 2) (* 2 2)))))
(cl-loop for i from 0 to (* (- middle-width 2) 2)
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i (* middle-width 2) (* 2 2)))))
(cl-loop for i from (* (- middle-width 2) 2) downto 0
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern i (* middle-width 2) (* 2 2)))))
(when (cl-evenp height)
(pl/pattern-to-string (,row-modifier (pl/row-pattern 0 (* middle-width 2) (* 2 2)))))))))
(defmacro pl/bar (dir)
"Generate a bar XPM function for DIR."
(pl/pattern-defun "bar" dir 2
'((2 2))))
(defmacro pl/box (dir)
"Generate a box XPM function for DIR."
(pl/pattern-defun "box" dir 2
'((0 0)
(0 0)
(1 1)
(1 1))
nil nil nil nil
;; 2x
'((0 0 0 0)
(0 0 0 0)
(0 0 0 0)
(0 0 0 0)
(1 1 1 1)
(1 1 1 1)
(1 1 1 1)
(1 1 1 1))))
(defmacro pl/brace (dir)
"Generate a brace XPM function for DIR."
(pl/pattern-defun "brace" dir 4
'((0 1 1 1))
'((1 1 1 1)
(2 1 1 1))
'((2 1 1 1)
(1 1 1 1))
'((0 1 1 1))
'((0 2 1 1)
(0 2 1 1)
(0 0 2 1)
(0 0 0 0)
(0 0 2 1)
(0 2 1 1)
(0 2 1 1))
;; 2x
'((0 0 1 1 1 1 1 1))
'((1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(2 1 1 1 1 1 1 1)
(0 2 1 1 1 1 1 1))
'((0 2 1 1 1 1 1 1)
(2 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1))
'((0 0 1 1 1 1 1 1))
'((0 0 2 1 1 1 1 1)
(0 0 0 1 1 1 1 1)
(0 0 0 2 1 1 1 1)
(0 0 0 0 1 1 1 1)
(0 0 0 0 2 1 1 1)
(0 0 0 0 0 2 1 1)
(0 0 0 0 0 0 0 2)
(0 0 0 0 0 0 0 2)
(0 0 0 0 0 2 1 1)
(0 0 0 0 2 1 1 1)
(0 0 0 0 1 1 1 1)
(0 0 0 2 1 1 1 1)
(0 0 0 1 1 1 1 1)
(0 0 2 1 1 1 1 1))))
(defmacro pl/butt (dir)
"Generate a butt XPM function for DIR."
(pl/pattern-defun "butt" dir 3
'((0 0 0))
'((1 1 1)
(0 1 1)
(0 0 1))
'((0 0 1)
(0 1 1)
(1 1 1))
nil nil
;; 2x
'((0 0 0 0 0 0))
'((1 1 1 1 1 1)
(0 1 1 1 1 1)
(0 0 1 1 1 1)
(0 0 0 1 1 1)
(0 0 0 0 1 1)
(0 0 0 0 0 1))
'((0 0 0 0 0 1)
(0 0 0 0 1 1)
(0 0 0 1 1 1)
(0 0 1 1 1 1)
(0 1 1 1 1 1)
(1 1 1 1 1 1))))
(defmacro pl/chamfer (dir)
"Generate a chamfer XPM function for DIR."
(pl/pattern-defun "chamfer" dir 3
'((0 0 0))
'((1 1 1)
(0 1 1)
(0 0 1))
nil nil nil
;; 2x
'((0 0 0 0 0 0))
'((1 1 1 1 1 1)
(0 1 1 1 1 1)
(0 0 1 1 1 1)
(0 0 0 1 1 1)
(0 0 0 0 1 1)
(0 0 0 0 0 1))))
(defmacro pl/contour (dir)
"Generate a contour XPM function for DIR."
(pl/pattern-defun "contour" dir 10
'((0 0 0 0 0 1 1 1 1 1))
'((1 1 1 1 1 1 1 1 1 1)
(0 2 1 1 1 1 1 1 1 1)
(0 0 2 1 1 1 1 1 1 1)
(0 0 0 2 1 1 1 1 1 1)
(0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 2 1 1 1 1 1))
'((0 0 0 0 0 2 1 1 1 1)
(0 0 0 0 0 0 1 1 1 1)
(0 0 0 0 0 0 2 1 1 1)
(0 0 0 0 0 0 0 2 1 1)
(0 0 0 0 0 0 0 0 0 0))
nil nil
;; 2x
'((0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1))
'((1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1))
'((0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))
(defmacro pl/curve (dir)
"Generate a curve XPM function for DIR."
(pl/pattern-defun "curve" dir 4
'((0 0 0 0))
'((1 1 1 1)
(2 1 1 1)
(0 0 1 1)
(0 0 2 1)
(0 0 0 1)
(0 0 0 2))
'((0 0 0 2)
(0 0 0 1)
(0 0 2 1)
(0 0 1 1)
(2 1 1 1)
(1 1 1 1))
nil nil
;; 2x
'((0 0 0 0 0 0 0 0))
'((1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(0 0 1 1 1 1 1 1)
(0 0 0 2 1 1 1 1)
(0 0 0 0 2 1 1 1)
(0 0 0 0 0 2 1 1)
(0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 0 1))
'((0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 1 1)
(0 0 0 0 0 2 1 1)
(0 0 0 0 2 1 1 1)
(0 0 0 2 1 1 1 1)
(0 0 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1)
(1 1 1 1 1 1 1 1))))
(defmacro pl/rounded (dir)
"Generate a rounded XPM function for DIR."
(pl/pattern-defun "rounded" dir 6
'((0 0 0 0 0 0))
'((2 1 1 1 1 1)
(0 0 2 1 1 1)
(0 0 0 0 1 1)
(0 0 0 0 2 1)
(0 0 0 0 0 1)
(0 0 0 0 0 2))
nil nil nil
;; 2x
'((0 0 0 0 0 0 0 0 0 0 0 0))
'((1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 2 1 1 1 1 1 1 1 1 1)
(0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 0 0 2 1 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1 1)
(0 0 0 0 0 0 0 0 0 1 1 1)
(0 0 0 0 0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 0 0 0 0 2 1)
(0 0 0 0 0 0 0 0 0 0 0 1)
(0 0 0 0 0 0 0 0 0 0 0 1))))
(defmacro pl/roundstub (dir)
"Generate a roundstub XPM function for DIR."
(pl/pattern-defun "roundstub" dir 3
'((0 0 0))
'((1 1 1)
(0 0 1)
(0 0 2))
'((0 0 2)
(0 0 1)
(1 1 1))
nil nil
;; 2x
'((0 0 0 0 0 0))
'((1 1 1 1 1 1)
(2 1 1 1 1 1)
(0 0 0 2 1 1)
(0 0 0 0 1 1)
(0 0 0 0 0 1)
(0 0 0 0 0 1))
'((0 0 0 0 0 1)
(0 0 0 0 0 1)
(0 0 0 0 1 1)
(0 0 0 2 1 1)
(2 1 1 1 1 1)
(1 1 1 1 1 1))))
(defmacro pl/slant (dir)
"Generate a slant XPM function for DIR."
(let* ((row-modifier (if (eq dir 'left) 'identity 'reverse)))
(pl/wrap-defun "slant" dir 'width
'((width (1- (ceiling height 2))))
`((cl-loop for i from 0 to (1- height)
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern (/ i 2) width)))))
`((cl-loop for i from 0 to (1- (* height 2))
concat (pl/pattern-to-string (,row-modifier (pl/row-pattern (/ i 2) (* width 2)))))))))
(defmacro pl/wave (dir)
"Generate a wave XPM function for DIR."
(pl/pattern-defun "wave" dir 11
'((0 0 0 0 0 0 1 1 1 1 1))
'((2 1 1 1 1 1 1 1 1 1 1)
(0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 2 1 1 1 1 1 1 1)
(0 0 0 0 1 1 1 1 1 1 1)
(0 0 0 0 2 1 1 1 1 1 1)
(0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 2 1 1 1 1 1))
'((0 0 0 0 0 0 2 1 1 1 1)
(0 0 0 0 0 0 0 1 1 1 1)
(0 0 0 0 0 0 0 1 1 1 1)
(0 0 0 0 0 0 0 2 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1)
(0 0 0 0 0 0 0 0 2 1 1)
(0 0 0 0 0 0 0 0 0 0 2))
nil nil
;; 2x
'((0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1))
'((1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1))
'((0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 1 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1)
(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))))
(defmacro pl/zigzag (dir)
"Generate a zigzag pattern XPM function for DIR."
(pl/pattern-defun "zigzag" dir 3
'((1 1 1)
(0 1 1)
(0 0 1)
(0 0 0)
(0 0 1)
(0 1 1))
nil nil nil nil
;; 2x
'((1 1 1 1 1 1)
(0 1 1 1 1 1)
(0 0 1 1 1 1)
(0 0 0 1 1 1)
(0 0 0 0 1 1)
(0 0 0 0 0 1)
(0 0 0 0 0 0)
(0 0 0 0 0 1)
(0 0 0 0 1 1)
(0 0 0 1 1 1)
(0 0 1 1 1 1)
(0 1 1 1 1 1))))
(defmacro pl/nil (dir)
"Generate a XPM function that returns nil for DIR."
`(defun ,(intern (format "powerline-nil-%s" (symbol-name dir)))
(face1 face2 &optional height)
nil))
(defmacro pl/utf-8 (dir)
"Generate function that returns raw utf-8 symbols."
(let ((dir-name (symbol-name dir))
(src-face (if (eq dir 'left) 'face1 'face2))
(dst-face (if (eq dir 'left) 'face2 'face1)))
`(defun ,(intern (format "powerline-utf-8-%s" dir-name))
(face1 face2 &optional height)
(powerline-raw
(char-to-string ,(intern (format "powerline-utf-8-separator-%s"
dir-name)))
(list :foreground (pl/background-color ,src-face)
:background (pl/background-color ,dst-face)
:inverse-video nil)))))
(provide 'powerline-separators)
;;; powerline-separators.el ends here

View File

@ -0,0 +1,267 @@
;;; powerline-themes.el --- Themes for Powerline
;; Copyright (C) 2012-2013 Donald Ephraim Curtis
;; Copyright (C) 2013 Jason Milkins
;; Copyright (C) 2012 Nicolas Rougier
;;; Commentary:
;;
;; Themes for Powerline.
;; Included themes: default, center, center-evil, vim, and nano.
;;
;;; Code:
(defcustom powerline-display-buffer-size t
"When non-nil, display the buffer size."
:group 'powerline
:type 'boolean)
(defcustom powerline-display-mule-info t
"When non-nil, display the mule info."
:group 'powerline
:type 'boolean)
(defcustom powerline-display-hud t
"When non-nil, display the hud."
:group 'powerline
:type 'boolean)
;;;###autoload
(defun powerline-default-theme ()
"Setup the default mode-line."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(mode-line-buffer-id (if active 'mode-line-buffer-id 'mode-line-buffer-id-inactive))
(mode-line (if active 'mode-line 'mode-line-inactive))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
(separator-left (intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right (intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir))))
(lhs (list (powerline-raw "%*" mode-line 'l)
(when powerline-display-buffer-size
(powerline-buffer-size mode-line 'l))
(when powerline-display-mule-info
(powerline-raw mode-line-mule-info mode-line 'l))
(powerline-buffer-id mode-line-buffer-id 'l)
(when (and (boundp 'which-func-mode) which-func-mode)
(powerline-raw which-func-format nil 'l))
(powerline-raw " ")
(funcall separator-left mode-line face1)
(when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode)
(powerline-raw erc-modified-channels-object face1 'l))
(powerline-major-mode face1 'l)
(powerline-process face1)
(powerline-minor-modes face1 'l)
(powerline-narrow face1 'l)
(powerline-raw " " face1)
(funcall separator-left face1 face2)
(powerline-vc face2 'r)
(when (bound-and-true-p nyan-mode)
(powerline-raw (list (nyan-create)) face2 'l))))
(rhs (list (powerline-raw global-mode-string face2 'r)
(funcall separator-right face2 face1)
(unless window-system
(powerline-raw (char-to-string #xe0a1) face1 'l))
(powerline-raw "%4l" face1 'l)
(powerline-raw ":" face1 'l)
(powerline-raw "%3c" face1 'r)
(funcall separator-right face1 mode-line)
(powerline-raw " ")
(powerline-raw "%6p" mode-line 'r)
(when powerline-display-hud
(powerline-hud face2 face1)))))
(concat (powerline-render lhs)
(powerline-fill face2 (powerline-width rhs))
(powerline-render rhs)))))))
;;;###autoload
(defun powerline-center-theme ()
"Setup a mode-line with major and minor modes centered."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(mode-line-buffer-id (if active 'mode-line-buffer-id 'mode-line-buffer-id-inactive))
(mode-line (if active 'mode-line 'mode-line-inactive))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
(separator-left (intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right (intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir))))
(lhs (list (powerline-raw "%*" mode-line 'l)
(powerline-buffer-size mode-line 'l)
(powerline-buffer-id mode-line-buffer-id 'l)
(powerline-raw " ")
(funcall separator-left mode-line face1)
(powerline-narrow face1 'l)
(powerline-vc face1)))
(rhs (list (powerline-raw global-mode-string face1 'r)
(powerline-raw "%4l" face1 'r)
(powerline-raw ":" face1)
(powerline-raw "%3c" face1 'r)
(funcall separator-right face1 mode-line)
(powerline-raw " ")
(powerline-raw "%6p" mode-line 'r)
(powerline-hud face2 face1)))
(center (list (powerline-raw " " face1)
(funcall separator-left face1 face2)
(when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode)
(powerline-raw erc-modified-channels-object face2 'l))
(powerline-major-mode face2 'l)
(powerline-process face2)
(powerline-raw " :" face2)
(powerline-minor-modes face2 'l)
(powerline-raw " " face2)
(funcall separator-right face2 face1))))
(concat (powerline-render lhs)
(powerline-fill-center face1 (/ (powerline-width center) 2.0))
(powerline-render center)
(powerline-fill face1 (powerline-width rhs))
(powerline-render rhs)))))))
(defun powerline-center-evil-theme ()
"Setup a mode-line with major, evil, and minor modes centered."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(mode-line-buffer-id (if active 'mode-line-buffer-id 'mode-line-buffer-id-inactive))
(mode-line (if active 'mode-line 'mode-line-inactive))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
(separator-left (intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right (intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir))))
(lhs (list (powerline-raw "%*" mode-line 'l)
(powerline-buffer-size mode-line 'l)
(powerline-buffer-id mode-line-buffer-id 'l)
(powerline-raw " ")
(funcall separator-left mode-line face1)
(powerline-narrow face1 'l)
(powerline-vc face1)))
(rhs (list (powerline-raw global-mode-string face1 'r)
(powerline-raw "%4l" face1 'r)
(powerline-raw ":" face1)
(powerline-raw "%3c" face1 'r)
(funcall separator-right face1 mode-line)
(powerline-raw " ")
(powerline-raw "%6p" mode-line 'r)
(powerline-hud face2 face1)))
(center (append (list (powerline-raw " " face1)
(funcall separator-left face1 face2)
(when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode)
(powerline-raw erc-modified-channels-object face2 'l))
(powerline-major-mode face2 'l)
(powerline-process face2)
(powerline-raw " " face2))
(if (split-string (format-mode-line minor-mode-alist))
(append (if evil-mode
(list (funcall separator-right face2 face1)
(powerline-raw evil-mode-line-tag face1 'l)
(powerline-raw " " face1)
(funcall separator-left face1 face2)))
(list (powerline-minor-modes face2 'l)
(powerline-raw " " face2)
(funcall separator-right face2 face1)))
(list (powerline-raw evil-mode-line-tag face2)
(funcall separator-right face2 face1))))))
(concat (powerline-render lhs)
(powerline-fill-center face1 (/ (powerline-width center) 2.0))
(powerline-render center)
(powerline-fill face1 (powerline-width rhs))
(powerline-render rhs)))))))
;;;###autoload
(defun powerline-vim-theme ()
"Setup a Vim-like mode-line."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(mode-line (if active 'mode-line 'mode-line-inactive))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
(separator-left (intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right (intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir))))
(lhs (list (powerline-buffer-id `(mode-line-buffer-id ,mode-line) 'l)
(powerline-raw "[" mode-line 'l)
(powerline-major-mode mode-line)
(powerline-process mode-line)
(powerline-raw "]" mode-line)
(when (buffer-modified-p)
(powerline-raw "[+]" mode-line))
(when buffer-read-only
(powerline-raw "[RO]" mode-line))
(powerline-raw "[%z]" mode-line)
;; (powerline-raw (concat "[" (mode-line-eol-desc) "]") mode-line)
(when (and (boundp 'which-func-mode) which-func-mode)
(powerline-raw which-func-format nil 'l))
(when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode)
(powerline-raw erc-modified-channels-object face1 'l))
(powerline-raw "[" mode-line 'l)
(powerline-minor-modes mode-line)
(powerline-raw "%n" mode-line)
(powerline-raw "]" mode-line)
(when (and vc-mode buffer-file-name)
(let ((backend (vc-backend buffer-file-name)))
(when backend
(concat (powerline-raw "[" mode-line 'l)
(powerline-raw (format "%s / %s" backend (vc-working-revision buffer-file-name backend)))
(powerline-raw "]" mode-line)))))))
(rhs (list (powerline-raw '(10 "%i"))
(powerline-raw global-mode-string mode-line 'r)
(powerline-raw "%l," mode-line 'l)
(powerline-raw (format-mode-line '(10 "%c")))
(powerline-raw (replace-regexp-in-string "%" "%%" (format-mode-line '(-3 "%p"))) mode-line 'r))))
(concat (powerline-render lhs)
(powerline-fill mode-line (powerline-width rhs))
(powerline-render rhs)))))))
;;;###autoload
(defun powerline-nano-theme ()
"Setup a nano-like mode-line."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(lhs (list (powerline-raw (concat "GNU Emacs "
(number-to-string
emacs-major-version)
"."
(number-to-string
emacs-minor-version))
nil 'l)))
(rhs (list (if (buffer-modified-p) (powerline-raw "Modified" nil 'r))))
(center (list (powerline-raw "%b" nil))))
(concat (powerline-render lhs)
(powerline-fill-center nil (/ (powerline-width center) 2.0))
(powerline-render center)
(powerline-fill nil (powerline-width rhs))
(powerline-render rhs)))))))
(provide 'powerline-themes)
;;; powerline-themes.el ends here

View File

@ -0,0 +1,582 @@
;;; powerline.el --- Rewrite of Powerline
;; Copyright (C) 2012-2013 Donald Ephraim Curtis
;; Copyright (C) 2013 Jason Milkins
;; Copyright (C) 2012 Nicolas Rougier
;; Author: Donald Ephraim Curtis <dcurtis@milkbox.net>
;; URL: http://github.com/milkypostman/powerline/
;; Version: 2.4
;; Keywords: mode-line
;; Package-Requires: ((cl-lib "0.2"))
;;; Commentary:
;;
;; Powerline is a library for customizing the mode-line that is based on the Vim
;; Powerline. A collection of predefined themes comes with the package.
;;
;;; Code:
(eval-and-compile (require 'powerline-themes))
(eval-and-compile (require 'powerline-separators))
(require 'cl-lib)
(defface powerline-active1 '((t (:background "grey22" :inherit mode-line)))
"Powerline face 1."
:group 'powerline)
(defface powerline-active2 '((t (:background "grey40" :inherit mode-line)))
"Powerline face 2."
:group 'powerline)
(defface powerline-inactive1
'((t (:background "grey11" :inherit mode-line-inactive)))
"Powerline face 1."
:group 'powerline)
(defface powerline-inactive2
'((t (:background "grey20" :inherit mode-line-inactive)))
"Powerline face 2."
:group 'powerline)
(defface mode-line-buffer-id-inactive
'((t (:inherit mode-line-buffer-id)))
"Powerline mode-line face"
:group 'powerline)
(defcustom powerline-default-separator 'arrow
"The separator to use for the default theme.
Valid Values: alternate, arrow, arrow-fade, bar, box, brace,
butt, chamfer, contour, curve, rounded, roundstub, wave, zigzag,
utf-8."
:group 'powerline
:type '(choice (const alternate)
(const arrow)
(const arrow-fade)
(const bar)
(const box)
(const brace)
(const butt)
(const chamfer)
(const contour)
(const curve)
(const rounded)
(const roundstub)
(const slant)
(const wave)
(const zigzag)
(const utf-8)
(const nil)))
(defcustom powerline-utf-8-separator-left #xe0b0
"The unicode character number for the left facing separator"
:group 'powerline
:type '(choice integer (const nil)))
(defcustom powerline-utf-8-separator-right #xe0b2
"The unicode character number for the right facing separator"
:group 'powerline
:type '(choice integer (const nil)))
(defcustom powerline-default-separator-dir '(left . right)
"The separator direction to use for the default theme.
CONS of the form (DIR . DIR) denoting the lean of the
separators for the left and right side of the powerline.
DIR must be one of: left, right"
:group 'powerline
:type '(cons (choice :tag "Left Hand Side" (const left) (const right))
(choice :tag "Right Hand Side" (const left) (const right))))
(defcustom powerline-height nil
"Override the mode-line height."
:group 'powerline
:type '(choice integer (const nil)))
(defcustom powerline-text-scale-factor nil
"Scale of mode-line font size to default text size.
Smaller mode-line fonts will be a float value less that 1.
Larger mode-line fonts require a float value greater than 1.
This is needed to make sure that text is properly aligned."
:group 'powerline
:type '(choice float integer (const nil)))
(defcustom powerline-buffer-size-suffix t
"Display the buffer size suffix."
:group 'powerline
:type 'boolean)
(defcustom powerline-gui-use-vcs-glyph nil
"Display a unicode character to represent a version control system. Not always supported in GUI."
:group 'powerline
:type 'boolean)
(defun pl/create-or-get-cache ()
"Return a frame-local hash table that acts as a memoization cache for powerline. Create one if the frame doesn't have one yet."
(let ((table (frame-parameter nil 'powerline-cache)))
(if (hash-table-p table) table (pl/reset-cache))))
(defun pl/reset-cache ()
"Reset and return the frame-local hash table used for a memoization cache."
(let ((table (make-hash-table :test 'equal)))
;; Store it as a frame-local variable
(modify-frame-parameters nil `((powerline-cache . ,table)))
table))
(defun powerline-current-separator ()
"Get the current default separator. Always returns utf-8 in non-gui mode."
(if window-system
powerline-default-separator
'utf-8))
;;
;; the frame-local powerline cache causes problems if included in a saved desktop,
;; so delete it before the desktop is saved.
;;
;; see https://github.com/milkypostman/powerline/issues/58
;;
;; It is better to put the following code into your init file for Emacs 24.4 or later.
;; (require 'frameset)
;; (push '(powerline-cache . :never) frameset-filter-alist)
;;
(defun powerline-delete-cache (&optional frame)
"Set the FRAME cache to nil."
(set-frame-parameter frame 'powerline-cache nil))
(defun powerline-desktop-save-delete-cache ()
"Set all caches to nil unless `frameset-filter-alist' has :never for powerline-cache."
(unless (and (boundp 'frameset-filter-alist)
(eq (cdr (assq 'powerline-cache frameset-filter-alist))
:never))
(dolist (fr (frame-list)) (powerline-delete-cache fr))))
(add-hook 'desktop-save-hook 'powerline-desktop-save-delete-cache)
;; from memoize.el @ http://nullprogram.com/blog/2010/07/26/
(defun pl/memoize (func)
"Memoize FUNC.
If argument is a symbol then install the memoized function over
the original function. Use frame-local memoization."
(cl-typecase func
(symbol (fset func (pl/memoize-wrap-frame-local (symbol-function func))) func)
(function (pl/memoize-wrap-frame-local func))))
(defun pl/memoize-wrap-frame-local (func)
"Return the memoized version of FUNC.
The memoization cache is frame-local."
(let ((funcid (cl-gensym)))
`(lambda (&rest args)
,(concat (documentation func) (format "\n(memoized function %s)" funcid))
(let* ((cache (pl/create-or-get-cache))
(key (cons ',funcid args))
(val (gethash key cache)))
(if val
val
(puthash key (apply ,func args) cache))))))
(defun pl/separator-height ()
"Get default height for rendering separators."
(or powerline-height (frame-char-height)))
(defun powerline-reset ()
"Reset memoized functions."
(interactive)
(pl/memoize (pl/alternate left))
(pl/memoize (pl/alternate right))
(pl/memoize (pl/arrow left))
(pl/memoize (pl/arrow right))
(pl/memoize (pl/arrow-fade left))
(pl/memoize (pl/arrow-fade right))
(pl/memoize (pl/bar left))
(pl/memoize (pl/bar right))
(pl/memoize (pl/box left))
(pl/memoize (pl/box right))
(pl/memoize (pl/brace left))
(pl/memoize (pl/brace right))
(pl/memoize (pl/butt left))
(pl/memoize (pl/butt right))
(pl/memoize (pl/chamfer left))
(pl/memoize (pl/chamfer right))
(pl/memoize (pl/contour left))
(pl/memoize (pl/contour right))
(pl/memoize (pl/curve left))
(pl/memoize (pl/curve right))
(pl/memoize (pl/rounded left))
(pl/memoize (pl/rounded right))
(pl/memoize (pl/roundstub left))
(pl/memoize (pl/roundstub right))
(pl/memoize (pl/slant left))
(pl/memoize (pl/slant right))
(pl/memoize (pl/wave left))
(pl/memoize (pl/wave right))
(pl/memoize (pl/zigzag left))
(pl/memoize (pl/zigzag right))
(pl/memoize (pl/nil left))
(pl/memoize (pl/nil right))
(pl/utf-8 left)
(pl/utf-8 right)
(pl/reset-cache))
(powerline-reset)
(defun pl/make-xpm (name color1 color2 data)
"Return an XPM image with NAME using COLOR1 for enabled and COLOR2 for disabled bits specified in DATA."
(when window-system
(create-image
(concat
(format "/* XPM */
static char * %s[] = {
\"%i %i 2 1\",
\". c %s\",
\" c %s\",
"
(downcase (replace-regexp-in-string " " "_" name))
(length (car data))
(length data)
(or (pl/hex-color color1) "None")
(or (pl/hex-color color2) "None"))
(let ((len (length data))
(idx 0))
(apply 'concat
(mapcar #'(lambda (dl)
(setq idx (+ idx 1))
(concat
"\""
(concat
(mapcar #'(lambda (d)
(if (eq d 0)
(string-to-char " ")
(string-to-char ".")))
dl))
(if (eq idx len)
"\"};"
"\",\n")))
data))))
'xpm t :ascent 'center)))
(defun pl/percent-xpm
(height pmax pmin winend winstart width color1 color2)
"Generate percentage xpm of HEIGHT for PMAX to PMIN given WINEND and WINSTART with WIDTH and COLOR1 and COLOR2."
(let* ((height- (1- height))
(fillstart (round (* height- (/ (float winstart) (float pmax)))))
(fillend (round (* height- (/ (float winend) (float pmax)))))
(data nil)
(i 0))
(while (< i height)
(setq data (cons
(if (and (<= fillstart i)
(<= i fillend))
(append (make-list width 1))
(append (make-list width 0)))
data))
(setq i (+ i 1)))
(pl/make-xpm "percent" color1 color2 (reverse data))))
(pl/memoize 'pl/percent-xpm)
;;;###autoload
(defun powerline-hud (face1 face2 &optional width)
"Return an XPM of relative buffer location using FACE1 and FACE2 of optional WIDTH."
(unless width (setq width 2))
(let ((color1 (if face1 (face-background face1) "None"))
(color2 (if face2 (face-background face2) "None"))
(height (or powerline-height (frame-char-height)))
pmax
pmin
(ws (window-start))
(we (window-end)))
(save-restriction
(widen)
(setq pmax (point-max))
(setq pmin (point-min)))
(pl/percent-xpm height pmax pmin we ws
(* (frame-char-width) width) color1 color2)))
;;;###autoload
(defun powerline-mouse (click-group click-type string)
"Return mouse handler for CLICK-GROUP given CLICK-TYPE and STRING."
(cond ((eq click-group 'minor)
(cond ((eq click-type 'menu)
`(lambda (event)
(interactive "@e")
(minor-mode-menu-from-indicator ,string)))
((eq click-type 'help)
`(lambda (event)
(interactive "@e")
(describe-minor-mode-from-indicator ,string)))
(t
`(lambda (event)
(interactive "@e")
nil))))
(t
`(lambda (event)
(interactive "@e")
nil))))
;;;###autoload
(defun powerline-concat (&rest strings)
"Concatonate STRINGS and pad sides by spaces."
(concat
" "
(mapconcat 'identity (delq nil strings) " ")
" "))
;;;###autoload
(defmacro defpowerline (name body)
"Create function NAME by wrapping BODY with powerline padding an propetization."
`(defun ,name
(&optional face pad)
(powerline-raw ,body face pad)))
(defun pl/property-substrings (str prop)
"Return a list of substrings of STR when PROP change."
(let ((beg 0) (end 0)
(len (length str))
(out))
(while (< end (length str))
(setq end (or (next-single-property-change beg prop str) len))
(setq out (append out (list (substring str beg (setq beg end))))))
out))
(defun pl/assure-list (item)
"Assure that ITEM is a list."
(if (listp item)
item
(list item)))
(defun pl/add-text-property (str prop val)
(mapconcat
(lambda (mm)
(let ((cur (pl/assure-list (get-text-property 0 'face mm))))
(propertize mm 'face (append cur (list val)))))
(pl/property-substrings str prop)
""))
;;;###autoload
(defun powerline-raw (str &optional face pad)
"Render STR as mode-line data using FACE and optionally PAD import on left (l) or right (r)."
(when str
(let* ((rendered-str (format-mode-line str))
(padded-str (concat
(when (and (> (length rendered-str) 0) (eq pad 'l)) " ")
(if (listp str) rendered-str str)
(when (and (> (length rendered-str) 0) (eq pad 'r)) " "))))
(if face
(pl/add-text-property padded-str 'face face)
padded-str))))
;;;###autoload
(defun powerline-fill (face reserve)
"Return empty space using FACE and leaving RESERVE space on the right."
(unless reserve
(setq reserve 20))
(when powerline-text-scale-factor
(setq reserve (* powerline-text-scale-factor reserve)))
(when (and window-system (eq 'right (get-scroll-bar-mode)))
(setq reserve (- reserve 3)))
(propertize " "
'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve)))
'face face))
(defun powerline-fill-center (face reserve)
"Return empty space using FACE to the center of remaining space leaving RESERVE space on the right."
(unless reserve
(setq reserve 20))
(when powerline-text-scale-factor
(setq reserve (* powerline-text-scale-factor reserve)))
(propertize " "
'display `((space :align-to (- (+ center (.5 . right-margin)) ,reserve
(.5 . left-margin))))
'face face))
;;;###autoload (autoload 'powerline-major-mode "powerline")
(defpowerline powerline-major-mode
(propertize (format-mode-line mode-name)
'mouse-face 'mode-line-highlight
'help-echo "Major mode\n\ mouse-1: Display major mode menu\n\ mouse-2: Show help for major mode\n\ mouse-3: Toggle minor modes"
'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line down-mouse-1]
`(menu-item ,(purecopy "Menu Bar") ignore
:filter (lambda (_) (mouse-menu-major-mode-map))))
(define-key map [mode-line mouse-2] 'describe-mode)
(define-key map [mode-line down-mouse-3] mode-line-mode-menu)
map)))
;;;###autoload (autoload 'powerline-minor-modes "powerline")
(defpowerline powerline-minor-modes
(mapconcat (lambda (mm)
(propertize mm
'mouse-face 'mode-line-highlight
'help-echo "Minor mode\n mouse-1: Display minor mode menu\n mouse-2: Show help for minor mode\n mouse-3: Toggle minor modes"
'local-map (let ((map (make-sparse-keymap)))
(define-key map
[mode-line down-mouse-1]
(powerline-mouse 'minor 'menu mm))
(define-key map
[mode-line mouse-2]
(powerline-mouse 'minor 'help mm))
(define-key map
[mode-line down-mouse-3]
(powerline-mouse 'minor 'menu mm))
(define-key map
[header-line down-mouse-3]
(powerline-mouse 'minor 'menu mm))
map)))
(split-string (format-mode-line minor-mode-alist))
(propertize " " 'face face)))
;;;###autoload (autoload 'powerline-narrow "powerline")
(defpowerline powerline-narrow
(let (real-point-min real-point-max)
(save-excursion
(save-restriction
(widen)
(setq real-point-min (point-min) real-point-max (point-max))))
(when (or (/= real-point-min (point-min))
(/= real-point-max (point-max)))
(propertize "Narrow"
'mouse-face 'mode-line-highlight
'help-echo "mouse-1: Remove narrowing from the current buffer"
'local-map (make-mode-line-mouse-map
'mouse-1 'mode-line-widen)))))
;;;###autoload (autoload 'powerline-vc "powerline")
(defpowerline powerline-vc
(when (and (buffer-file-name (current-buffer)) vc-mode)
(if (and window-system (not powerline-gui-use-vcs-glyph))
(format-mode-line '(vc-mode vc-mode))
(format " %s%s"
(char-to-string #xe0a0)
(format-mode-line '(vc-mode vc-mode))))))
;;;###autoload (autoload 'powerline-buffer-size "powerline")
(defpowerline powerline-buffer-size
(propertize
(if powerline-buffer-size-suffix
"%I"
"%i")
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-1 (lambda () (interactive)
(setq powerline-buffer-size-suffix
(not powerline-buffer-size-suffix))
(force-mode-line-update)))))
;;;###autoload (autoload 'powerline-buffer-id "powerline")
(defun powerline-buffer-id (&optional face pad)
(powerline-raw
(format-mode-line
(concat " " (propertize
"%b"
'face face
'mouse-face 'mode-line-highlight
'help-echo "Buffer name\n\ mouse-1: Previous buffer\n\ mouse-3: Next buffer"
'local-map (let ((map (make-sparse-keymap)))
(define-key map [mode-line mouse-1] 'mode-line-previous-buffer)
(define-key map [mode-line mouse-3] 'mode-line-next-buffer)
map))))
face pad))
;;;###autoload (autoload 'powerline-process "powerline")
(defpowerline powerline-process
(cond
((symbolp mode-line-process) (symbol-value mode-line-process))
((listp mode-line-process) (format-mode-line mode-line-process))
(t mode-line-process)))
(defvar pl/default-mode-line mode-line-format)
(defvar pl/minibuffer-selected-window-list '())
(defun pl/minibuffer-selected-window ()
"Return the selected window when entereing the minibuffer."
(when pl/minibuffer-selected-window-list
(car pl/minibuffer-selected-window-list)))
(defun pl/minibuffer-setup ()
"Save the `minibuffer-selected-window' to `pl/minibuffer-selected-window'."
(push (minibuffer-selected-window) pl/minibuffer-selected-window-list))
(add-hook 'minibuffer-setup-hook 'pl/minibuffer-setup)
(defun pl/minibuffer-exit ()
"Set `pl/minibuffer-selected-window' to nil."
(pop pl/minibuffer-selected-window-list))
(add-hook 'minibuffer-exit-hook 'pl/minibuffer-exit)
(defvar powerline-selected-window (frame-selected-window))
(defun powerline-set-selected-window ()
"sets the variable `powerline-selected-window` appropriately"
(when (not (minibuffer-window-active-p (frame-selected-window)))
(setq powerline-selected-window (frame-selected-window))))
(defun powerline-unset-selected-window ()
"Unsets the variable `powerline-selected-window` and updates the modeline"
(setq powerline-selected-window nil)
(force-mode-line-update))
(add-hook 'window-configuration-change-hook 'powerline-set-selected-window)
;; focus-in-hook was introduced in emacs v24.4.
;; Gets evaluated in the last frame's environment.
(add-hook 'focus-in-hook 'powerline-set-selected-window)
;; focus-out-hook was introduced in emacs v24.4.
(add-hook 'focus-out-hook 'powerline-unset-selected-window)
;; Executes after the window manager requests that the user's events
;; be directed to a different frame.
(defadvice handle-switch-frame
(after powerline-set-selected-window-after-switch-frame activate)
(powerline-set-selected-window))
(defadvice select-window (after powerline-select-window activate)
"makes powerline aware of window changes"
(powerline-set-selected-window))
;;;###autoload (autoload 'powerline-selected-window-active "powerline")
(defun powerline-selected-window-active ()
"Return whether the current window is active."
(eq powerline-selected-window (selected-window)))
(defun powerline-revert ()
"Revert to the default Emacs mode-line."
(interactive)
(setq-default mode-line-format pl/default-mode-line))
(defun pl/render (item)
"Render a powerline ITEM."
(cond
((and (listp item) (eq 'image (car item)))
(propertize " " 'display item
'face (plist-get (cdr item) :face)))
(item item)))
(defun powerline-render (values)
"Render a list of powerline VALUES."
(mapconcat 'pl/render values ""))
(defun powerline-width (values)
"Get the length of VALUES."
(if values
(let ((val (car values)))
(+ (cond
((stringp val) (string-width (format-mode-line val)))
((and (listp val) (eq 'image (car val)))
(car (image-size val)))
(t 0))
(powerline-width (cdr values))))
0))
(provide 'powerline)
;;; powerline.el ends here

View File

@ -0,0 +1,116 @@
;;; smart-mode-line-light-powerline-theme.el --- light smart-mode-line theme that mimics the powerline appearance.
;; Copyright (C) 2015 Artur Malabarba <bruce.connor.am@gmail.com>
;;; License:
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;; Code:
(deftheme smart-mode-line-light-powerline
"Light powerline theme for smart-mode-line.
Mimics the appearance of powerline.")
(require 'powerline)
(set-face-attribute 'powerline-active1 nil :inherit 'sml/global :background "Grey70")
(set-face-attribute 'powerline-active2 nil :inherit 'sml/global :background "Grey57")
(let ((l0 "grey85")
(l3 (face-background 'powerline-active1))
(l8 (face-background 'powerline-active2))
(separator-left
'(intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right
'(intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir)))))
(custom-theme-set-faces
'smart-mode-line-light-powerline
`(mode-line-buffer-id ((t :inherit sml/filename :foreground nil :background nil)))
`(mode-line-inactive ((((background dark)) :foreground "grey20" :background ,l0
:slant italic :box (:line-width -3 :color "black"))
(((background light)) :foreground "grey20" :background ,l0
:slant italic :box (:line-width -2 :color "white"))))
`(mode-line ((t :foreground "black" :background ,l0 :box (:line-width -1 :color "white"))))
`(sml/global ((t :foreground "grey20" :background ,l0 :inverse-video nil)))
;; Layer 0
`(sml/line-number ((t :foreground "Black" :inherit sml/global :weight bold :background ,l0)))
`(sml/remote ((t :inherit sml/global :background ,l0)))
`(sml/col-number ((t :inherit sml/global :background ,l0)))
`(sml/numbers-separator ((t :inherit sml/col-number :background ,l0)))
`(sml/client ((t :inherit sml/prefix :background ,l0)))
`(sml/mule-info ((t :inherit sml/global :background ,l0)))
`(sml/not-modified ((t :inherit sml/global :background ,l0)))
'(sml/read-only ((t :inherit sml/not-modified :foreground "DarkGreen" :weight bold)))
;; 3
`(sml/prefix ((t :background ,l3 :inherit sml/global :foreground "#5b2507" :weight bold)))
`(sml/filename ((t :background ,l3 :inherit sml/global :foreground "Blue" :weight bold)))
`(sml/sudo ((t :background ,l3 :inherit sml/outside-modified)))
`(sml/git ((t :background ,l3 :inherit (sml/read-only sml/prefix))))
`(sml/folder ((t :background ,l3 :inherit sml/global :weight normal :foreground "Black")))
;; 8
`(sml/name-filling ((t :background ,l8 :inherit sml/prefix :weight normal)))
`(sml/position-percentage ((t :background ,l8 :inherit sml/prefix :weight normal :foreground "#330000")))
`(sml/modes ((t :background ,l8 :inherit sml/global :foreground "Gray10")))
`(sml/process ((t :background ,l8 :inherit sml/prefix)))
`(sml/vc ((t :background ,l8 :inherit sml/git :foreground "#0000aa")))
`(sml/vc-edited ((t :background ,l8 :inherit sml/prefix :foreground "#330000")))
;; 3
;; minor modes
`(sml/minor-modes ((t :inherit sml/folder)))
;; 0
`(sml/discharging ((t :background ,l0 :inherit sml/global :foreground "Red")))
`(sml/time ((t :background ,l0 :inherit sml/global)))
`(persp-selected-face ((t :foreground "ForestGreen" :inherit sml/filename)))
`(helm-candidate-number ((t :foreground nil :background nil :inherit sml/filename))))
(custom-theme-set-variables
'smart-mode-line-light-powerline
'(sml/mode-width (if (eq (powerline-current-separator) 'arrow) 'right 'full))
`(sml/pre-id-separator
'(""
(:propertize " " face sml/global)
(:eval (propertize " " 'display (funcall ,separator-left 'sml/global 'powerline-active1)))
(:propertize " " face powerline-active1)))
`(sml/pos-id-separator
'(""
(:propertize " " face powerline-active1)
(:eval (propertize " " 'display (funcall ,separator-left 'powerline-active1 'powerline-active2)))
(:propertize " " face powerline-active2)))
`(sml/pre-minor-modes-separator
'("" (:propertize " " face powerline-active2)
(:eval (propertize " " 'display (funcall ,separator-right 'powerline-active2 'powerline-active1)))
(:propertize " " face powerline-active1)))
`(sml/pos-minor-modes-separator
'("" (:propertize " " face powerline-active1)
(:eval (propertize " " 'display (funcall ,separator-right 'powerline-active1 'sml/global)))
(:propertize " " face sml/global)))
'(sml/pre-modes-separator
(propertize " " 'face 'sml/modes))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'smart-mode-line-light-powerline)
;;; smart-mode-line-light-powerline-theme.el ends here.

View File

@ -0,0 +1,32 @@
;;; smart-mode-line-powerline-theme-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "smart-mode-line-light-powerline-theme" "smart-mode-line-light-powerline-theme.el"
;;;;;; (22505 14730 422040 357000))
;;; Generated autoloads from smart-mode-line-light-powerline-theme.el
(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
;;;***
;;;### (autoloads nil "smart-mode-line-powerline-theme" "smart-mode-line-powerline-theme.el"
;;;;;; (22505 14730 414040 364000))
;;; Generated autoloads from smart-mode-line-powerline-theme.el
(when load-file-name (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
;;;***
;;;### (autoloads nil nil ("smart-mode-line-powerline-theme-pkg.el")
;;;;;; (22505 14730 426040 353000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; smart-mode-line-powerline-theme-autoloads.el ends here

View File

@ -0,0 +1,9 @@
(define-package "smart-mode-line-powerline-theme" "20160705.1738" "smart-mode-line theme that mimics the powerline appearance."
'((emacs "24.3")
(powerline "2.2")
(smart-mode-line "2.5"))
:url "http://github.com/Bruce-Connor/smart-mode-line" :keywords
'("mode-line" "faces" "themes"))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -0,0 +1,126 @@
;;; smart-mode-line-powerline-theme.el --- smart-mode-line theme that mimics the powerline appearance.
;; Copyright (C) 2014 Artur Malabarba <bruce.connor.am@gmail.com>
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; URL: http://github.com/Bruce-Connor/smart-mode-line
;; Version: 0.1a
;; Package-Requires: ((emacs "24.3") (powerline "2.2") (smart-mode-line "2.5"))
;; Keywords: mode-line faces themes
;; Separator: -
;;; License:
;;
;; This file is NOT part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;;; Change Log:
;; 0.1a - 2014/05/15 - powerline-theme essentially finished.
;; 0.1a - 2014/05/14 - Created File.
;;; Code:
(deftheme smart-mode-line-powerline
"Powerline theme for smart-mode-line.
Mimics the appearance of powerline.")
(require 'powerline)
(set-face-attribute 'powerline-active2 nil :inherit 'sml/global)
(set-face-attribute 'powerline-active1 nil :inherit 'sml/global)
(let ((l0 "black")
(l3 (or (face-background 'powerline-active1) "Grey30"))
(l8 (or (face-background 'powerline-active2) "Grey80"))
(separator-left
'(intern (format "powerline-%s-%s"
(powerline-current-separator)
(car powerline-default-separator-dir))))
(separator-right
'(intern (format "powerline-%s-%s"
(powerline-current-separator)
(cdr powerline-default-separator-dir)))))
(custom-theme-set-faces
'smart-mode-line-powerline
`(mode-line-buffer-id ((t :inherit sml/filename :foreground nil :background nil)))
`(mode-line-inactive ((((background dark)) :foreground "gray60" :background "Black"
:slant italic :box (:line-width -3 :color "black"))
(((background light)) :foreground "gray60" :background "Black"
:slant italic :box (:line-width -2 :color "white"))))
`(mode-line ((t :foreground "gray60" :background ,l0 :box (:line-width -1 :color "Black"))))
`(sml/global ((t :foreground "gray60" :background ,l0 :inverse-video nil)))
;; Layer 0
`(sml/line-number ((t :foreground "White" :inherit sml/global :weight bold :background ,l0)))
`(sml/remote ((t :inherit sml/global :background ,l0)))
`(sml/col-number ((t :inherit sml/global :background ,l0)))
`(sml/numbers-separator ((t :inherit sml/col-number :background ,l0)))
`(sml/client ((t :inherit sml/prefix :background ,l0)))
`(sml/mule-info ((t :inherit sml/global :background ,l0)))
`(sml/not-modified ((t :inherit sml/global :background ,l0)))
'(sml/read-only ((t :inherit sml/not-modified :foreground "Cyan")))
;; 3
`(sml/prefix ((t :background ,l3 :inherit sml/global :foreground "#bf6000")))
`(sml/filename ((t :background ,l3 :inherit sml/global :foreground "gold")))
`(sml/sudo ((t :background ,l3 :inherit sml/outside-modified)))
`(sml/git ((t :background ,l3 :inherit (sml/read-only sml/prefix))))
`(sml/folder ((t :background ,l3 :inherit sml/global :weight normal :foreground "Black")))
;; 8
`(sml/name-filling ((t :background ,l8 :inherit sml/prefix :weight normal)))
`(sml/position-percentage ((t :background ,l8 :inherit sml/prefix :weight normal :foreground "#330000")))
`(sml/modes ((t :background ,l8 :inherit sml/global :foreground "Black")))
`(sml/process ((t :background ,l8 :inherit sml/prefix)))
`(sml/vc ((t :background ,l8 :inherit sml/git :foreground "#0000aa")))
`(sml/vc-edited ((t :background ,l8 :inherit sml/prefix :foreground "#330000")))
;; 3
;; minor modes
`(sml/minor-modes ((t :inherit sml/folder)))
;; 0
`(sml/discharging ((t :background ,l0 :inherit sml/global :foreground "Red")))
`(sml/time ((t :background ,l0 :inherit sml/global)))
`(persp-selected-face ((t :foreground "ForestGreen" :inherit sml/filename)))
`(helm-candidate-number ((t :foreground nil :background nil :inherit sml/filename))))
(custom-theme-set-variables
'smart-mode-line-powerline
'(sml/mode-width (if (eq (powerline-current-separator) 'arrow) 'right 'full))
`(sml/pre-id-separator
'(""
(:propertize " " face sml/global)
(:eval (propertize " " 'display (funcall ,separator-left 'sml/global 'powerline-active1)))
(:propertize " " face powerline-active1)))
`(sml/pos-id-separator
'(""
(:propertize " " face powerline-active1)
(:eval (propertize " " 'display (funcall ,separator-left 'powerline-active1 'powerline-active2)))
(:propertize " " face powerline-active2)))
`(sml/pre-minor-modes-separator
'("" (:propertize " " face powerline-active2)
(:eval (propertize " " 'display (funcall ,separator-right 'powerline-active2 'powerline-active1)))
(:propertize " " face powerline-active1)))
`(sml/pos-minor-modes-separator
'("" (:propertize " " face powerline-active1)
(:eval (propertize " " 'display (funcall ,separator-right 'powerline-active1 'sml/global)))
(:propertize " " face sml/global)))
'(sml/pre-modes-separator
(propertize " " 'face 'sml/modes))))
;;;###autoload
(when load-file-name
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'smart-mode-line-powerline)
;;; smart-mode-line-powerline-theme.el ends here.

View File

@ -19,7 +19,7 @@
'(custom-enabled-themes (quote (tango-dark)))
'(custom-safe-themes
(quote
("c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
("84d2f9eeb3f82d619ca4bfffe5f157282f4779732f48a5ac1484d94d5ff5b279" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" "1e7e097ec8cb1f8c3a912d7e1e0331caeed49fef6cff220be63bd2a6ba4cc365" "fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))
'(ediff-merge-split-window-function (quote split-window-horizontally))
'(ediff-split-window-function (quote split-window-vertically))
'(fiplr-ignored-globs
@ -62,7 +62,7 @@
("e6h" . "http://www.e6h.org/packages/"))))
'(package-selected-packages
(quote
(yaml-mode xlicense wakatime-mode vala-mode sass-mode nyan-mode muse markdown-mode mark magit-gh-pulls magit-gerrit json-mode js2-mode jinja2-mode helm-make helm-gtags helm-flyspell helm-ag go-mode gitignore-mode gitconfig-mode git-gutter ggtags fiplr erlang django-mode company-shell company-quickhelp company-c-headers coffee-mode buffer-move ag)))
(smart-mode-line-powerline-theme yaml-mode xlicense wakatime-mode vala-mode sass-mode nyan-mode muse markdown-mode mark magit-gh-pulls magit-gerrit json-mode js2-mode jinja2-mode helm-make helm-gtags helm-flyspell helm-ag go-mode gitignore-mode gitconfig-mode git-gutter ggtags fiplr erlang django-mode company-shell company-quickhelp company-c-headers coffee-mode buffer-move ag)))
'(safe-local-variable-values
(quote
((company-clang-arguments "-I.." "-I/home/polesz/jhbuild/install/include/atk-1.0" "-I/home/polesz/jhbuild/install/include/at-spi-2.0" "-I/home/polesz/jhbuild/install/include/at-spi2-atk/2.0" "-I/home/polesz/jhbuild/install/include/cairo" "-I/home/polesz/jhbuild/install/include/gdk-pixbuf-2.0" "-I/home/polesz/jhbuild/install/include/gio-unix-2.0/" "-I/home/polesz/jhbuild/install/include/glib-2.0" "-I/home/polesz/jhbuild/install/include/gtk-3.0" "-I/home/polesz/jhbuild/install/include/harfbuzz" "-I/home/polesz/jhbuild/install/include/libgda-5.0" "-I/home/polesz/jhbuild/install/include/libgda-5.0/libgda" "-I/home/polesz/jhbuild/install/include/librsvg-2.0" "-I/home/polesz/jhbuild/install/include/libsoup-2.4" "-I/home/polesz/jhbuild/install/include/pango-1.0" "-I/home/polesz/jhbuild/install/include/swe-glib" "-I/home/polesz/jhbuild/install/include/webkitgtk-4.0" "-I/home/polesz/jhbuild/install/lib/glib-2.0/include" "-I/usr/include/dbus-1.0" "-I/usr/include/freetype2" "-I/usr/include/libdrm" "-I/usr/include/libpng16" "-I/usr/include/libxml2" "-I/usr/include/pixman-1" "-I/usr/lib64/dbus-1.0/include")
@ -72,7 +72,7 @@
'(savehist-mode t)
'(sgml-basic-offset 4)
'(show-trailing-whitespace t)
'(sml/theme (quote respectful))
'(sml/theme (quote powerline))
'(tab-width 4)
'(wakatime-api-key "3f97611e-c959-4ce3-a526-bf0241307e17")
'(wakatime-cli-path "/usr/local/bin/wakatime"))