TheBB / spaceline

Powerline theme from Spacemacs
GNU General Public License v3.0
534 stars 60 forks source link

Version control #20

Open justmytwospence opened 8 years ago

justmytwospence commented 8 years ago

Many folks only use one version control backend. Would there be interest in making a setting that allows you to disabled the Git: or whatever backend in the vc segment? Or maybe even replace it with that nice little unicode branchy symbol or something.

TheBB commented 8 years ago

I had the same thoughts. I'm sure I will think of something. :-)

joehillen commented 8 years ago

I have this in my .spacemacs

  ;; fancy git icon
  (defadvice vc-mode-line (after strip-backend () activate)
    (when (stringp vc-mode)
      (let ((gitlogo (replace-regexp-in-string "^ Git." "  " vc-mode)))
        (setq vc-mode gitlogo))))
louy2 commented 8 years ago

@joehillen What font are you using to display that PUA codepoint?

louy2 commented 8 years ago

@joehillen Found it, not surprisingly Font Awesome. But I am confused about how to set the font in Emacs to make it work.

TheBB commented 8 years ago

You can specify the font as a face attribute. http://www.gnu.org/software/emacs/manual/html_node/elisp/Face-Attributes.html

TheBB commented 8 years ago
(propertize "weird string" 'face '((:family "whatever")))

Or something along those lines.

TheBB commented 8 years ago

We can also sidestep the font issue by outputting XPM images, like the powerline separators.

jwintz commented 8 years ago

joehillen's patch works great for me !

screen shot 2016-03-17 at 18 46 49

On MacOSX ElCapitan, just download the font and double click the .ttf file, then install.

mphojele commented 4 years ago

@theBB so what did you decide since then regarding this issue?