Skip to content

tiankai0426/emacs-octicons

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Emacs octicons glyph name

The octicon font by github (https://github.com/styleguide/css/) provides some nice icons embedded in a font. This package gives an easier access to them and must be used with the relevant face (octicons).

I do not provide the octicon font. You will need to install it yourself from the github styleguide site (search in the page source).

Example

This define a mode-line that prepend an octoface (github) if the file is under a version control system

(require 'octicons)

(make-face 'octicons-mode-line)
(set-face-attribute 'octicons-mode-line nil
                    :inherit 'mode-line
                    :inherit 'octicons)

(setq-default mode-line-format (list
    " "
    '(:eval (if (vc-backend buffer-file-name)
                (list
                 (propertize octicon-octoface 'face 'octicons-modeline)
                 (propertize " "              'face 'mode-line))))
   mode-line-mule-info
   'mode-line-modified
   "-  "
   'mode-line-buffer-identification
   "  (%l, %c)  "
   'mode-line-modes
   " -- "
   `(vc-mode vc-mode)
))

You should obtain something like this:

octicons modeline screenshot

About

Octicons glyph name for emacs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%