+(defface powerline-active11 '((t (:background "grey22" :inherit mode-line)))
+ "Powerline face 1."
+ :group 'powerline)
+
+(defface powerline-active22 '((t (:background "grey40" :inherit mode-line)))
+ "Powerline face 2."
+ :group 'powerline)
+
+(defface powerline-inactive11 '((t (:background "grey11" :inherit mode-line)))
+ "Powerline face 1."
+ :group 'powerline)
+
+(defface powerline-inactive22 '((t (:background "grey20" :inherit mode-line)))
+ "Powerline face 2."
+ :group 'powerline)
+
+
+;(defface powerline-active-yel '((t (:background "yellow" :inherit mode-line)))
+(defface powerline-active-yel '((t (:background "yellow" :inherit mode-line)))
+ "Powerline face 1."
+ :group 'powerline)
+
+(defface powerline-active-blue '((t (:background "blue" :inherit mode-line)))
+ "Powerline face 1."
+ :group 'powerline)
+
+;;;---------------- evil powerline
+; https://github.com/raugturi/powerline-evil/blob/master/powerline-evil.el
+; ;https://github.com/laynor/emacs-conf/blob/master/packages/sm-package-powerline.el
+;(defface powerline-evil-base-face '((t (:foreground "white" :inherit mode-line)))
+;(defface powerline-evil-base-face '((t (:foreground "black" :weight bold )))
+(defface powerline-evil-base-face '((t (:foreground "black" :weight bold :inherit mode-line)))
+ "Base face for powerline evil faces."
+ :group 'powerline)
+
+(defface powerline-evil-normal-face '((t (:background "green" :inherit powerline-evil-base-face)))
+ "Powerline face for evil NORMAL state."
+ :group 'powerline)
+
+(defface powerline-evil-insert-face '((t (:background "blue" :inherit powerline-evil-base-face)))
+ "Powerline face for evil INSERT state."
+ :group 'powerline)
+
+(defface powerline-evil-visual-face '((t (:background "orange" :inherit powerline-evil-base-face)))
+ "Powerline face for evil VISUAL state."
+ :group 'powerline)
+
+(defface powerline-evil-operator-face '((t (:background "cyan" :inherit powerline-evil-base-face)))
+ "Powerline face for evil OPERATOR state."
+ :group 'powerline)
+
+(defface powerline-evil-replace-face '((t (:background "red" :inherit powerline-evil-base-face)))
+ "Powerline face for evil REPLACE state."
+ :group 'powerline)
+
+(defface powerline-evil-motion-face '((t (:background "magenta" :inherit powerline-evil-base-face)))
+ "Powerline face for evil MOTION state."
+ :group 'powerline)
+
+(defface powerline-evil-emacs-face '((t (:background "violet" :inherit powerline-evil-base-face)))
+ "Powerline face for evil EMACS state."
+ :group 'powerline)
+
+(defun powerline-evil-face ()
+ "Function to select appropriate face based on `evil-state'."
+ (let* ((face (intern (concat "powerline-evil-" (symbol-name evil-state) "-face"))))
+ (if (facep face) face nil)))
+
+
+ (defun powerline-evil-face (active)
+ (let ((face (intern (concat "powerline-evil-" (symbol-name evil-state) "-face"))))
+ (cond ((and active (facep face))
+ face)
+ (active 'powerline-active22)
+ (t 'powerline-inactive22))))
+
+ (defun powerline-evil-face-22 (active)
+ (if (equal (symbol-name evil-state) "normal")
+
+ (let ((face (intern (concat "powerline-evil-emacs-face"))))
+ face)
+
+ (let ((face (intern (concat "powerline-evil-normal-face"))))
+ face)
+
+;; (cond ((and active (facep face))
+;; face)
+;; (active 'powerline-active22)
+;; (t 'powerline-inactive22)))
+
+;;;; (let ((face (intern (concat "powerline-evil-" (symbol-name evil-state) "-face"))))
+;;;; (cond ((and active (facep face))
+;;;; face)
+;;;; (active 'powerline-active22)
+;;;; (t 'powerline-inactive22)))
+ )
+ )
+
+
+
+ (defpowerline powerline-evil-tag
+ (concat " " (replace-regexp-in-string "[<> ]" "" (eval (evil-state-property evil-state :tag))) " "))
+
+
+
+
+
+;;
+;;http://emacser.com/mode-line.htm
+(defun get-lines-4-mode-line ()
+ (let ((lines (count-lines (point-min) (point-max))))
+ (concat (propertize
+ (format "%d" lines)
+ 'mouse-face 'mode-line-highlight
+ 'face 'mode-line-lines-face
+ 'help-echo (format "%d lines" lines)) " ")))