2015-12-21 11:26:39 +01:00
|
|
|
#+TITLE: mode-icons
|
|
|
|
#+DATE: Monday, Dec 21 2015
|
|
|
|
#+STARTUP: content
|
2013-06-02 14:14:58 +02:00
|
|
|
|
2015-12-21 11:26:39 +01:00
|
|
|
Show icons instead of mode names in emacs.
|
2013-06-02 14:14:58 +02:00
|
|
|
|
2015-12-21 11:26:39 +01:00
|
|
|
[[https://raw.githubusercontent.com/rhoit/mode-icons/dump/screenshots/screenshot01.png]]
|
2013-06-02 14:14:58 +02:00
|
|
|
|
2016-02-21 14:54:15 +01:00
|
|
|
Some of the modes that have icons instead of names now:
|
2013-06-02 14:14:58 +02:00
|
|
|
|
2015-12-22 04:17:09 +01:00
|
|
|
| Modes | icon |
|
|
|
|
|------------+--------------------------------------------------------------------------|
|
2015-12-23 11:06:49 +01:00
|
|
|
| Coffee | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/coffee.png]] |
|
2015-12-22 04:17:09 +01:00
|
|
|
| CSS | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/css.png]] |
|
|
|
|
| Emacs-Lisp | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/emacs.png]] |
|
2015-12-23 11:06:49 +01:00
|
|
|
| Haml | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/haml.png]] |
|
2015-12-22 04:17:09 +01:00
|
|
|
| HTML | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/html.png]] |
|
|
|
|
| JS | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/js.png]] |
|
|
|
|
| Lisp | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/cl.png]] |
|
|
|
|
| Org-mode | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/org.png]] |
|
|
|
|
| PHP | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/php.png]] |
|
|
|
|
| Python | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/python.png]] |
|
2015-12-23 11:06:49 +01:00
|
|
|
| Ruby | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/ruby.png]] |
|
2015-12-22 04:17:09 +01:00
|
|
|
| SVG | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/svg.png]] |
|
2015-12-23 11:06:49 +01:00
|
|
|
| Sass | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/sass.png]] |
|
2015-12-22 04:17:09 +01:00
|
|
|
| Scheme | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/scheme.png]] |
|
|
|
|
| Shell | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/bash.png]] |
|
2015-12-23 11:06:49 +01:00
|
|
|
| Slim | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/slim.png]] |
|
|
|
|
| YAML | [[https://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/yaml.png]] |
|
2015-12-22 04:17:09 +01:00
|
|
|
|
2016-04-01 07:13:00 +02:00
|
|
|
* Requirements
|
|
|
|
|
|
|
|
As of version 0.3.0 you can also use icons from some icon fonts,
|
|
|
|
specifically:
|
|
|
|
|
|
|
|
- [[http://fontawesome.io/][Font Awesome]]
|
|
|
|
- [[https://octicons.github.com/][GitHub Octicons]]
|
|
|
|
- [[http://fizzed.com/oss/font-mfizz][Font Mfizz]]
|
|
|
|
- [[https://icomoon.io/#icons-icomoon][IcoMoon]]
|
|
|
|
|
2016-04-04 15:32:02 +02:00
|
|
|
The icons look the best if you have the fonts installed on your
|
|
|
|
system and mode-icons will not do this for you.
|
2016-04-01 07:13:00 +02:00
|
|
|
|
|
|
|
* Installation
|
2016-04-04 15:32:02 +02:00
|
|
|
** Manually
|
2016-04-01 07:13:00 +02:00
|
|
|
|
|
|
|
Place ~mode-icons.el~ somewhere in your =load-path= and copy the
|
|
|
|
~icons/~ directory there as well. Then =require= ~mode-icons~ in your
|
|
|
|
[[http://gnu.org/software/emacs][Emacs]] init file.
|
|
|
|
|
|
|
|
* Usage
|
|
|
|
Once installed you can add =(mode-icons-mode)= to your init file.
|
|
|
|
** Ignoring mode-icons in other buffers
|
2016-03-31 06:42:55 +02:00
|
|
|
When looking at buffers with commands like ~ibuffer~, they display the
|
|
|
|
icons for the mode names as well. If you don't like this behavior you
|
|
|
|
can change ~mode-icons-change-mode-name~ to be nil:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq mode-icons-change-mode-name nil)
|
|
|
|
#+END_SRC
|
2016-04-01 07:13:00 +02:00
|
|
|
|
|
|
|
** Changing how mode-icons recolors images
|
2016-03-31 19:38:09 +02:00
|
|
|
Additionally, if the image icon was an ~xpm~ icon, then you can have
|
|
|
|
it changed to match your mode-line face. In the example below, the
|
|
|
|
inactive mode-line shows the emacs and yasnippet icon changed to match
|
|
|
|
the inactive mode-line:
|
|
|
|
|
|
|
|
[[http://i.imgur.com/QOM9wYM.png]]
|
|
|
|
|
|
|
|
This is enabled by default, and can be disabled by:
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq mode-icons-desaturate-inactive nil)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
You can also change the icon to match the active mode line (disabled by default):
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq mode-icons-desaturate-active t)
|
|
|
|
#+END_SRC
|
|
|
|
|
2016-04-01 07:13:00 +02:00
|
|
|
Some of the black and white images are tagged as black and white and
|
|
|
|
are automatically recolored to match the mode-line face. You can turn this off
|
|
|
|
and use the black and white image by setting:
|
2013-06-02 14:14:58 +02:00
|
|
|
|
2016-04-01 07:13:00 +02:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(setq mode-icons-grayscale-transform nil)
|
|
|
|
#+END_SRC
|
2016-04-19 15:41:24 +02:00
|
|
|
** Creating xpm images from fonts
|
|
|
|
To create/recreate all the xpm images for the font images, you can
|
|
|
|
run =M-x mode-icons--convert-all-font-icons-to-xpm=.
|
|
|
|
|
|
|
|
This requires a working =gimp= installation, and all the fonts for the
|
|
|
|
icons installed. This will start an inferior scheme process for
|
|
|
|
=gimp= in =*mode-icons-gimp*= and convert all the images to xpm files.
|
|
|
|
|
|
|
|
After the images are created, you can stop the =gimp= process by
|
|
|
|
typing:
|
|
|
|
|
|
|
|
=M-x mode-icons--stop-gimp-inferior=
|
|
|
|
|
|
|
|
This should be stopped evetually if there is no input received to gimp.
|
|
|
|
|
2016-04-04 15:32:02 +02:00
|
|
|
|