4

I've just installed powerline to update my emacs looks for the 21. century. I like it, but I'm bothered that the modified-buffer indicator is just a simple, barely discernible asterisk.

Is there a way to make the fact that the buffer is modified to be more eye-catching?

My config up to now is very simple:

(use-package powerline
  :config
  (setq powerline-display-buffer-size nil)
  (setq powerline-display-mule-info nil)
  (setq powerline-display-hud nil)
  (which-function-mode)
  (when (display-graphic-p)
    (powerline-default-theme)))

Is there a simple way to change certain faces without creating custom poweline themes (I also don't like the color of the (which-function-mode) output.

Thank you very much!

  • Please provide a link to "Powerline". That can help others help you. – Drew Dec 20 '15 at 21:55
3
  • I use spaceline.

    Basically it's built on top of powerline and let you build your mode-line by adding several segments one after the other (in both left and right sections).

    For instance, the following segment: (major-mode :face highlight-face) will insert the current major mode and apply a special face to it. This face highlight-face changes following several criterias. You can customize spaceline-modified, spaceline-read-only and spaceline-unmodified faces to fix your issue.

  • If you still want to use powerline, you need to do what spaceline already does. That is to check for buffer status and apply the face you want. See buffer-read-only and buffer-modified-p.

Here is how my mode-line looks like:

Normal enter image description here Modified enter image description here Read-only enter image description here Helm enter image description here

  • It isn't clear to me how exactly to get spaceline to produce something like your screeshots. Could you share your config? – erikstokes Jun 24 '16 at 0:14
  • Sure, there you go. :-) – Mathieu Marques Jun 24 '16 at 6:29
0

I had the same issue. Here is my spaceline configuration in totality to achieve the modified buffer objective:

  (require 'spaceline-config)
  (spaceline-emacs-theme)
  (setq spaceline-highlight-face-func 'spaceline-highlight-face-modified)

Then customize the face, say, via M-x customize or:

(custom-set-faces
 '(spaceline-modified ((t (:background "OrangeRed" :foreground "#3E3D31"
                                       :inherit (quote mode-line))))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.