Skip to content

Commit

Permalink
Fix powerline active colours
Browse files Browse the repository at this point in the history
  • Loading branch information
trishume committed Oct 23, 2014
1 parent 41a0f08 commit b08406d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
16 changes: 16 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@
(require 'server)
(unless (server-running-p)
(server-start))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ac-ispell-requires 4)
'(ahs-case-fold-search nil)
'(ahs-default-range (quote ahs-range-whole-buffer))
'(ahs-idle-interval 0.25)
'(ring-bell-function (quote ignore) t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
23 changes: 12 additions & 11 deletions spacemacs/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,15 @@ of 2 characters. If INSERT? is not nil then the first key pressed is inserted
(setq spacemacs-mode-line-flycheckp nil)
(setq spacemacs-mode-line-flycheckp t)))
(evil-leader/set-key "tmf" 'spacemacs/mode-line-flycheck-info-toggle)

;; for now we hardcode the height value of powerline depending on the
;; window system, a better solution would be to compute it correctly
;; in powerline package.
(let ((height (if (eq 'w32 window-system) 18 17)))
(setq-default powerline-height height))
(setq-default powerline-default-separator 'wave)
(setq-default mode-line-format '("%e" (:eval
(let* ((active (eq (frame-selected-window) (selected-window)))
(let* ((active (powerline-selected-window-active))
(line-face (if active 'mode-line 'mode-line-inactive))
(face1 (if active 'powerline-active1 'powerline-inactive1))
(face2 (if active 'powerline-active2 'powerline-inactive2))
Expand Down Expand Up @@ -448,10 +449,10 @@ of 2 characters. If INSERT? is not nil then the first key pressed is inserted
;; (funcall separator-right state-face nil)
;; buffer name
(list
(powerline-raw "%*" nil 'l)
(powerline-buffer-size nil 'l)
(powerline-buffer-id nil 'l)
(powerline-raw " " nil)
(powerline-raw "%*" line-face 'l)
(powerline-buffer-size line-face 'l)
(powerline-buffer-id line-face 'l)
(powerline-raw " " line-face)
;; major mode
(funcall separator-left line-face face1)
(powerline-major-mode face1 'l)
Expand All @@ -460,7 +461,7 @@ of 2 characters. If INSERT? is not nil then the first key pressed is inserted
;; flycheck
(if flycheckp
(list
(powerline-raw " " nil)
(powerline-raw " " line-face)
(powerline-raw (spacemacs//custom-flycheck-lighter error)
'spacemacs-mode-line-error-face)
(powerline-raw (spacemacs//custom-flycheck-lighter warning)
Expand All @@ -476,9 +477,9 @@ of 2 characters. If INSERT? is not nil then the first key pressed is inserted
;; minor modes
(if spacemacs-mode-line-minor-modesp
(list
(powerline-minor-modes nil 'l)
(powerline-raw mode-line-process nil 'l)
(powerline-raw " " nil)))
(powerline-minor-modes line-face 'l)
(powerline-raw mode-line-process line-face 'l)
(powerline-raw " " line-face)))
;; version control
(if (or flycheckp spacemacs-mode-line-minor-modesp)
(list (funcall separator-left (if vc-face line-face face1) vc-face)))
Expand All @@ -491,8 +492,8 @@ of 2 characters. If INSERT? is not nil then the first key pressed is inserted
(powerline-raw " " face1)
(powerline-raw "%l:%2c" face1 'r)
(funcall separator-left face1 line-face)
(powerline-raw " " nil)
(powerline-raw "%p" nil 'r)
(powerline-raw " " line-face)
(powerline-raw "%p" line-face 'r)
(powerline-chamfer-left line-face face1)
;; display hud only if necessary
(let ((progress (format-mode-line "%p")))
Expand Down

0 comments on commit b08406d

Please sign in to comment.