My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init-powerline-doom-one.el 5.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. (defface my-pl-segment1-active
  2. '((t (:foreground "#181E26" :background "#51AFEF")))
  3. "Powerline first segment active face.")
  4. (defface my-pl-segment1-inactive
  5. '((t (:foreground "#FFFFFF" :background "#404850")))
  6. "Powerline first segment inactive face.")
  7. (defface my-pl-segment2-active
  8. '((t (:foreground "#DFDFDF" :background "#1f5582")))
  9. "Powerline second segment active face.")
  10. (defface my-pl-segment2-inactive
  11. '((t (:foreground "#FFFFFF" :background "#404850")))
  12. "Powerline second segment inactive face.")
  13. (defface my-pl-segment3-active
  14. '((t (:foreground "#DFDFDF" :background "#22252C")))
  15. "Powerline third segment active face.")
  16. (defface my-pl-segment3-inactive
  17. '((t (:foreground "#FFFFFF" :background "#22252C")))
  18. "Powerline third segment inactive face.")
  19. (defun air--powerline-default-theme ()
  20. "Set up my custom Powerline with Evil indicators."
  21. (interactive)
  22. (setq-default mode-line-format
  23. '("%e"
  24. (:eval
  25. (let* ((active (powerline-selected-window-active))
  26. (seg1 (if active 'my-pl-segment1-active 'my-pl-segment1-inactive))
  27. (seg2 (if active 'my-pl-segment2-active 'my-pl-segment2-inactive))
  28. (seg3 (if active 'my-pl-segment3-active 'my-pl-segment3-inactive))
  29. (separator-left (intern (format "powerline-%s-%s"
  30. (powerline-current-separator)
  31. (car powerline-default-separator-dir))))
  32. (separator-right (intern (format "powerline-%s-%s"
  33. (powerline-current-separator)
  34. (cdr powerline-default-separator-dir))))
  35. (lhs (list (let ((evil-face (powerline-evil-face)))
  36. (if evil-mode
  37. (powerline-raw (powerline-evil-tag) evil-face)
  38. ))
  39. (if evil-mode
  40. (funcall separator-left (powerline-evil-face) seg1))
  41. ;;(when powerline-display-buffer-size
  42. ;; (powerline-buffer-size nil 'l))
  43. ;;(when powerline-display-mule-info
  44. ;; (powerline-raw mode-line-mule-info nil 'l))
  45. (powerline-buffer-id seg1 'l)
  46. (powerline-raw "[%*]" seg1 'l)
  47. (when (and (boundp 'which-func-mode) which-func-mode)
  48. (powerline-raw which-func-format seg1 'l))
  49. (powerline-raw " " seg1)
  50. (funcall separator-left seg1 seg2)
  51. (when (boundp 'erc-modified-channels-object)
  52. (powerline-raw erc-modified-channels-object seg2 'l))
  53. (powerline-major-mode seg2 'l)
  54. (powerline-process seg2)
  55. (powerline-minor-modes seg2 'l)
  56. (powerline-narrow seg2 'l)
  57. (powerline-raw " " seg2)
  58. (funcall separator-left seg2 seg3)
  59. (powerline-vc seg3 'r)
  60. (when (bound-and-true-p nyan-mode)
  61. (powerline-raw (list (nyan-create)) seg3 'l))))
  62. (rhs (list (powerline-raw global-mode-string seg3 'r)
  63. (funcall separator-right seg3 seg2)
  64. (unless window-system
  65. (powerline-raw (char-to-string #xe0a1) seg2 'l))
  66. (powerline-raw "%4l" seg2 'l)
  67. (powerline-raw ":" seg2 'l)
  68. (powerline-raw "%3c" seg2 'r)
  69. (funcall separator-right seg2 seg1)
  70. (powerline-raw " " seg1)
  71. (powerline-raw "%6p" seg1 'r)
  72. (when powerline-display-hud
  73. (powerline-hud seg1 seg3)))))
  74. (concat (powerline-render lhs)
  75. (powerline-fill seg3 (powerline-width rhs))
  76. (powerline-render rhs)))))))
  77. (custom-set-faces
  78. '(powerline-evil-emacs-face ((t (:inherit powerline-evil-base-face :background "#ff6c6b"))))
  79. '(powerline-evil-insert-face ((t (:inherit powerline-evil-base-face :background "#CDB464"))))
  80. '(powerline-evil-normal-face ((t (:inherit powerline-evil-base-face :background "#404850"))))
  81. '(powerline-evil-replace-face ((t (:inherit powerline-evil-base-face :background "#da8548"))))
  82. '(powerline-evil-visual-face ((t (:inherit powerline-evil-base-face :background "#C678DD"))))
  83. '(powerline-evil-operator-face ((t (:inherit powerline-evil-operator-face :background "#5699AF")))))
  84. (use-package powerline
  85. :ensure t
  86. :config
  87. (setq powerline-default-separator (if (display-graphic-p) 'slant
  88. nil))
  89. (air--powerline-default-theme))
  90. (use-package powerline-evil
  91. :ensure t)
  92. (provide 'init-powerline-doom-one)