Open BowenWang opened 5 years ago
Hi,
I'm guessing you copied those from the rainbow example? Those colorsyms aren't defined in the package; you need to define them (and any faces along with them).
Also, you typo'd orange
(defface my-red '((t (:foreground "white" :background "red"))) "")
(defface my-orange '((t (:foreground "dim grey" :background "orange"))) "")
(defface my-green '((t (:foreground "dim grey" :background "green"))) "")
(defface my-blue '((t (:foreground "white" :background "blue"))) "")
(setq telephone-line-faces
'((red . (my-red . my-red))
(orange . (my-orange . my-orange))
(green . (my-green . my-green))
(blue . (my-blue . my-blue))
(evil . telephone-line-evil-face)
(accent . (telephone-line-accent-active . telephone-line-accent-inactive))
(nil . (mode-line . mode-line-inactive))))
Ok, you are right, I have already fixed the problem.
I have another issue, is that possible to set the telephone-line so that the modelines in inactive buffers are different from the current active buffer so that I can quickly figure out which buffer I am looking into?
Thanks.
Yes, you can use the :active
and :inactive
modifiers.
Basically, replace
a-segment
in your lhs/rhs with
(a-segment :active)
and now it'll only appear for an active window. Same for :inactive
So for example, if you only wanted line numbers on an active window, you'd do
(setq telephone-line-lhs
'((red . (telephone-line-vc-segment
telephone-line-process-segment
(telephone-line-position-segment :active)
telephone-line-misc-info-segment))
(...)
Ok, I tried the try to modify my configuration, but it seems it doesn't work: (setq telephone-line-lhs '((red . ((telephone-line-vc-segment :active))) (ored . ((telephone-line-process-segment :active))) (yellow . ((telephone-line-atom-encoding-segment :active))) (chartreuse . ((telephone-line-atom-eol-segment :active))) (green . ((telephone-line-filesize-segment :active :active))) (sgreen . ((telephone-line-major-mode-segment :active))) (cyan . ((telephone-line-minor-mode-segment :active))) (blue . ((telephone-line-narrow-segment :active))) (dmagenta . ((telephone-line-window-number-segment :active))) ))
Do you know how to fix this?
I'd need to see the error you're getting (*Messages*
and *Warnings*
buffers).
Hi, I am a new user to telephone line, I tried to add as many segments as possible in my configuration, but it seems that it doesn't work, here is my configuration
I only tried to add segments to the left side, here is the screenshot of the mode line:
It seems that I didn't add anything, I didn't set the right side, it is just the Spacemacs default.
Any ideas?