conf-powerline.el 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. (provide 'conf-powerline)
  2. (require 'powerline)
  3. (call-interactively 'display-time-mode)
  4. (defun powerline-distopico-theme ()
  5. "Setup the default mode-line."
  6. (interactive)
  7. (setq-default mode-line-format
  8. '("%e"
  9. (:eval
  10. (let* ((active (powerline-selected-window-active))
  11. (mode-line (if active 'mode-line 'mode-line-inactive))
  12. (face1 (if active 'powerline-active1 'powerline-inactive1))
  13. (face2 (if active 'powerline-active2 'powerline-inactive2))
  14. (separator-left (intern (format "powerline-%s-%s"
  15. powerline-default-separator
  16. (car powerline-default-separator-dir))))
  17. (separator-right (intern (format "powerline-%s-%s"
  18. powerline-default-separator
  19. (cdr powerline-default-separator-dir))))
  20. (lhs (list (powerline-raw "%*" nil 'l)
  21. ;(powerline-buffer-size nil 'l)
  22. ;(powerline-raw mode-line-mule-info nil 'l)
  23. (powerline-buffer-id nil 'l)
  24. (when (and (boundp 'which-func-mode) which-func-mode)
  25. (powerline-raw which-func-format nil 'l))
  26. (powerline-raw " ")
  27. (funcall separator-left mode-line face1)
  28. (when (boundp 'erc-modified-channels-object)
  29. (powerline-raw erc-modified-channels-object face1 'l))
  30. (powerline-major-mode face1 'l)
  31. (powerline-process face1)
  32. ;(powerline-minor-modes face1 'l)
  33. (powerline-narrow face1 'l)
  34. (powerline-raw " " face1)
  35. (funcall separator-left face1 face2)
  36. (powerline-vc face2 'r)))
  37. (rhs (list (powerline-raw global-mode-string face2 'r)
  38. (funcall separator-right face2 face1)
  39. (powerline-raw "%4l" face1 'r)
  40. (powerline-raw ":" face1 'l)
  41. (powerline-raw "%3c" face1 'r)
  42. (funcall separator-right face1 mode-line)
  43. (powerline-raw " ")
  44. (powerline-raw "%6p" nil 'r)
  45. (powerline-hud face2 face1))))
  46. (concat (powerline-render lhs)
  47. (powerline-fill face2 (powerline-width rhs))
  48. (powerline-render rhs)))))))
  49. (powerline-distopico-theme)
  50. (setq powerline-default-separator 'wave)
  51. (custom-set-faces
  52. '(powerline-active1 ((t (:foreground "#f9f9f9" :background "#123550" :box nil))))
  53. '(powerline-active2 ((t (:foreground "#f9f9f9" :background "#112230" :box nil))))
  54. )
  55. ;#112230