65

GitHub - ryuslash/mode-icons: Show icons instead of mode names

 5 years ago
source link: https://github.com/ryuslash/mode-icons
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.org

mode-icons

Show icons instead of mode names in emacs.

https://raw.githubusercontent.com/rhoit/mode-icons/dump/screenshots/screenshot01.png

Some of the modes that have icons instead of names now:

ModesiconCoffeehttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/coffee.pngCSShttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/css.pngEmacs-Lisphttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/emacs.pngHamlhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/haml.pngHTMLhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/html.pngJShttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/js.pngLisphttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/cl.pngOrg-modehttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/org.pngPHPhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/php.pngPythonhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/python.pngRubyhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/ruby.pngSVGhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/svg.pngSasshttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/sass.pngSchemehttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/scheme.pngShellhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/bash.pngSlimhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/slim.pngYAMLhttps://raw.githubusercontent.com/rhoit/mode-icons/dump/icons/yaml.png

Requirements

As of version 0.3.0 you can also use icons from some icon fonts, specifically:

The icons look the best if you have the fonts installed on your system and mode-icons will not do this for you.

Installation

Manually

Place mode-icons.el somewhere in your load-path and copy the icons/ directory there as well. Then require mode-icons in your Emacs init file.

Usage

Once installed you can add (mode-icons-mode) to your init file.

Ignoring mode-icons in other buffers

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:

(setq mode-icons-change-mode-name nil)

Changing how mode-icons recolors images

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 also will match whatever color-theme you have installed. For example, if you use the popular cyberpunk theme, you would see the icons colored to match the color-theme

http://i.imgur.com/qV6ncIb.png

This is enabled by default, and can be disabled by:

(setq mode-icons-desaturate-inactive nil)

You can also change the icon to match the active mode line (disabled by default):

(setq mode-icons-desaturate-active t)

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:

(setq mode-icons-grayscale-transform nil)

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK