Powerline Won't Display Properly when passing new segment to powerline-hud
apierz opened this issue · comments
I'm customizing my powerline theme but I am having difficulty using the powerline-hud function to change the colors of the hud.
Here are my faces:
(defface my-pl-segment1-active
'((t (:foreground "#f1fa8c" :background "#3a2e58")))
"Powerline first segment active face.")
(defface my-pl-segment1-inactive
'((t (:foreground "#bd93f9" :background "#3A2E58")))
"Powerline first segment inactive face.")
(defface my-pl-segment2-active
'((t (:foreground "#3a2e58" :background "#bd93f9")))
"Powerline second segment active face.")
(defface my-pl-segment2-inactive
'((t (:foreground "#bd93f9" :background "#3A2E58")))
"Powerline second segment inactive face.")
(defface my-pl-segment3-active
'((t (:foreground "#bd93f9" :background "#3A2E58")))
"Powerline third segment active face.")
(defface my-pl-segment3-inactive
'((t (:foreground "#bd93f9" :background "#3A2E58")))
"Powerline third segment inactive face.")
(defface my-pl-segment4-active
'((t (:foreground "#ffffff" :background "f1fa8c")))
"Powerline hud segment active face.")
(defface my-pl-segment4-inactive
'((t (:foreground "#ffffff" :background "bd93f9")))
"Powerline hud segment inactive face.")
and the start of my theme:
(defun air--powerline-default-theme ()
"Set up my custom Powerline with Evil indicators."
(interactive)
(setq-default mode-line-format
'("%e"
(:eval
(let* ((active (powerline-selected-window-active))
(seg1 (if active 'my-pl-segment1-active 'my-pl-segment1-inactive))
(seg2 (if active 'my-pl-segment2-active 'my-pl-segment2-inactive))
(seg3 (if active 'my-pl-segment3-active 'my-pl-segment3-inactive))
(seg4 (if active 'my-pl-segment4-active 'my-pl-segment4-inactive))
I can use seg1, seg2 or seg3 for powerline-hud but they do not have the colors I want so I added the fourth which does. However when I use this in my theme:
(when powerline-display-hud
(powerline-hud seg1 seg4))
I get a solid grey bar for my powerline.
I have no problem using seg4 for any other parts of the theme. For example:
(powerline-raw "xx" seg4)
displays "xx" in my powerline with no problems. The only thing that won't display properly is the hud.
found the error immediately after posting. missing #s in my colors.