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!

user673592
  • 839
  • 7
  • 17

2 Answers2

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

Mathieu Marques
  • 1,953
  • 1
  • 13
  • 30
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))))))
Julien Chastang
  • 256
  • 1
  • 8