vscode-icon-emacs icon indicating copy to clipboard operation
vscode-icon-emacs copied to clipboard

Utility package that return vscode icons for emacs

#+TITLE: VsCode Icons for Emacs

[[https://melpa.org/#/vscode-icon][file:https://melpa.org/packages/vscode-icon-badge.svg]]

  • Install This package is intended to be used as a dependency to other packages. (e.g. in a Package-Requires: block)

    To install separately:

    #+begin_src emacs-lisp :tangle yes (use-package vscode-icon :ensure t :commands (vscode-icon-for-file)) #+end_src

    For best quality icons, users should install Emacs with imagemagick support. #+begin_src sh :tangle yes brew install emacs --HEAD --with-librsvg --with-cocoa --with-imagemagick@6 #+end_src

    Emacs 27 on OSX without imagemagick support should also work.

  • Usage #+begin_src emacs-lisp :tangle yes (setq json-image (vscode-icon-for-file "somejsonfile.json")) (insert-image json-image) #+end_src

  • Screenshots [[./screenshots/ex.png]]

  • Examples Take a look at [[https://github.com/jojojames/dired-sidebar][dired-sidebar]] for more screenshots and example usage.

  • Using different sized icons This package comes with 128x128 sized icons as well as 23x23 sized icons.

    If emacs comes with imagemagick support compiled in, this package will use the 128x128 sized icons and scale them accordingly.

    If emacs doesn't come with imagemagick support, 23x23 sized icons will be used. If these icons are not a good size, it is possible to convert the icon yourself.

    #+begin_src emacs-lisp :tangle yes ; M-x vscode-icon-convert-and-copy ; Enter the size of the icon you'd like. ; The icons will be converted and moved to a custom user directory ; that can be customized using `vscode-icon-extra-icon-directory'. ; Look at the defcustoms in this package for more details. #+end_src

    #+begin_src emacs-lisp :tangle yes ; A simple example if I want 16x16 icons: ; M-x vscode-icon-convert-and-copy ; 16 RET ; (setq vscode-icon-size 16) #+end_src

  • Source https://github.com/vscode-icons/vscode-icons

  • Help Wanted Emacs scales 128x128 icons better with imagemagick support than my own imagemagick command. It'd be good to figure this out...