Skip to content

Commit

Permalink
Begin adding vscode icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Miller committed Aug 17, 2018
1 parent d9a55d8 commit c5be3b4
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 31 deletions.
2 changes: 2 additions & 0 deletions icons/vsc/README.txt
@@ -0,0 +1,2 @@
The icons in this subdirectory are taken from vscode-icons (https://github.com/vscode-icons/vscode-icons)
and are licensed under the Creative Commons - ShareAlike (CC BY-SA) license: https://creativecommons.org/licenses/by-sa/4.0/.
Binary file added icons/vsc/binary.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/dependencies.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/elm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/elx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/license.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/lisp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/log.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/lua.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/makefile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/nim.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/org.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/perl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/r.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/ruby.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/scss.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/sql.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/toml.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/vim.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/xml.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/vsc/zip.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 50 additions & 31 deletions src/elisp/treemacs-icons.el
Expand Up @@ -141,7 +141,7 @@ Also save the assignments in `treemacs--default-icons-alist'."
(setq ,@key-values)
,@assignments)))

(defsubst treemacs--setup-tui-icons ()
(defun treemacs--setup-tui-icons ()
"Will set textual icon values for non-file icons."
(treemacs--set-icon-save-default
treemacs-icon-closed treemacs-icon-closed-text
Expand All @@ -152,7 +152,7 @@ Also save the assignments in `treemacs--default-icons-alist'."
treemacs-icon-tag-node-closed treemacs-icon-tag-node-closed-text
treemacs-icon-tag-node-open treemacs-icon-tag-node-open-text))

(defsubst treemacs--setup-gui-icons ()
(defun treemacs--setup-gui-icons ()
"Will set graphical values for non-file icons.
Will also fill `treemacs-icons-hash' with graphical file icons."
;; first setup png variants of the non-file icons
Expand All @@ -175,36 +175,55 @@ Will also fill `treemacs-icons-hash' with graphical file icons."
treemacs-icon-tag-node-open treemacs-icon-tag-node-open-png)

;; then create and hash all the extension-based icons
(treemacs--setup-icon treemacs-icon-yaml "yaml.png" "yml" "yaml")
(treemacs--setup-icon treemacs-icon-shell "shell.png" "sh" "zsh" "fish")
(treemacs--setup-icon treemacs-icon-pdf "pdf.png" "pdf")
(treemacs--setup-icon treemacs-icon-c "c.png" "c" "h")
(treemacs--setup-icon treemacs-icon-cpp "cpp.png" "cpp" "cxx" "hpp" "tpp" "cc" "hh")
(treemacs--setup-icon treemacs-icon-haskell "haskell.png" "hs" "lhs" "cabal")
(treemacs--setup-icon treemacs-icon-python "python.png" "py" "pyc")
(treemacs--setup-icon treemacs-icon-markdown "markdown.png" "md")
(treemacs--setup-icon treemacs-icon-rust "rust.png" "rs")
(treemacs--setup-icon treemacs-icon-image "image.png" "jpg" "jpeg" "bmp" "svg" "png" "xpm")
(treemacs--setup-icon treemacs-icon-emacs "emacs.png" "el" "elc" "org")
(treemacs--setup-icon treemacs-icon-clojure "clojure.png" "clj" "cljs" "cljc")
(treemacs--setup-icon treemacs-icon-typescript "typescript.png" "ts" "tsx")
(treemacs--setup-icon treemacs-icon-vue "vue.png" "vue")
(treemacs--setup-icon treemacs-icon-css "css.png" "css")
(treemacs--setup-icon treemacs-icon-conf "conf.png" "properties" "conf" "config" "ini" "xdefaults" "xresources" "terminalrc" "toml")
(treemacs--setup-icon treemacs-icon-html "html.png" "html" "htm")
(treemacs--setup-icon treemacs-icon-git "git.png" "git" "gitignore" "gitconfig")
(treemacs--setup-icon treemacs-icon-dart "dart.png" "dart")
(treemacs--setup-icon treemacs-icon-java "java.png" "java")
(treemacs--setup-icon treemacs-icon-kotlin "kotlin.png" "kt")
(treemacs--setup-icon treemacs-icon-scala "scala.png" "scala")
(treemacs--setup-icon treemacs-icon-sbt "sbt.png" "sbt")
(treemacs--setup-icon treemacs-icon-go "go.png" "go")
(treemacs--setup-icon treemacs-icon-js "js.png" "js" "jsx")
(treemacs--setup-icon treemacs-icon-hy "hy.png" "hy")
(treemacs--setup-icon treemacs-icon-json "json.png" "json")
(treemacs--setup-icon treemacs-icon-julia "julia.png" "jl")
(treemacs--setup-icon treemacs-icon-yaml "yaml.png" "yml" "yaml")
(treemacs--setup-icon treemacs-icon-shell "shell.png" "sh" "zsh" "fish")
(treemacs--setup-icon treemacs-icon-pdf "pdf.png" "pdf")
(treemacs--setup-icon treemacs-icon-c "c.png" "c" "h")
(treemacs--setup-icon treemacs-icon-cpp "cpp.png" "cpp" "cxx" "hpp" "tpp" "cc" "hh")
(treemacs--setup-icon treemacs-icon-haskell "haskell.png" "hs" "lhs" "cabal")
(treemacs--setup-icon treemacs-icon-python "python.png" "py" "pyc")
(treemacs--setup-icon treemacs-icon-markdown "markdown.png" "md")
(treemacs--setup-icon treemacs-icon-rust "rust.png" "rs")
(treemacs--setup-icon treemacs-icon-image "image.png" "jpg" "jpeg" "bmp" "svg" "png" "xpm")
(treemacs--setup-icon treemacs-icon-emacs "emacs.png" "el" "elc")
(treemacs--setup-icon treemacs-icon-clojure "clojure.png" "clj" "cljs" "cljc")
(treemacs--setup-icon treemacs-icon-typescript "typescript.png" "ts" "tsx")
(treemacs--setup-icon treemacs-icon-vue "vue.png" "vue")
(treemacs--setup-icon treemacs-icon-css "css.png" "css")
(treemacs--setup-icon treemacs-icon-conf "conf.png" "properties" "conf" "config" "ini" "xdefaults" "xresources" "terminalrc" "ledgerrc")
(treemacs--setup-icon treemacs-icon-html "html.png" "html" "htm")
(treemacs--setup-icon treemacs-icon-git "git.png" "git" "gitignore" "gitconfig")
(treemacs--setup-icon treemacs-icon-dart "dart.png" "dart")
(treemacs--setup-icon treemacs-icon-java "java.png" "java")
(treemacs--setup-icon treemacs-icon-kotlin "kotlin.png" "kt")
(treemacs--setup-icon treemacs-icon-scala "scala.png" "scala")
(treemacs--setup-icon treemacs-icon-sbt "sbt.png" "sbt")
(treemacs--setup-icon treemacs-icon-go "go.png" "go")
(treemacs--setup-icon treemacs-icon-js "js.png" "js" "jsx")
(treemacs--setup-icon treemacs-icon-hy "hy.png" "hy")
(treemacs--setup-icon treemacs-icon-json "json.png" "json")
(treemacs--setup-icon treemacs-icon-julia "julia.png" "jl")
(treemacs--setup-icon treemacs-icon-elixir "elixir.png" "ex")
(treemacs--setup-icon treemacs-icon-elixir-light "elixir_light.png" "exs" "eex"))
(treemacs--setup-icon treemacs-icon-elixir-light "elixir_light.png" "exs" "eex")
(treemacs--setup-icon treemacs-icon-makefile "vsc/makefile.png" "makefile")
(treemacs--setup-icon treemacs-icon-license "vsc/license.png" "license")
(treemacs--setup-icon treemacs-icon-zip "vsc/zip.png" "zip" "7z" "tar" "gz" "rar")
(treemacs--setup-icon treemacs-icon-elm "vsc/elm.png" "elm")
(treemacs--setup-icon treemacs-icon-xml "vsc/xml.png" "xml")
(treemacs--setup-icon treemacs-icon-binary "vsc/binary.png" "exe")
(treemacs--setup-icon treemacs-icon-ruby "vsc/ruby.png" "rb")
(treemacs--setup-icon treemacs-icon-scss "vsc/scss.png" "scss")
(treemacs--setup-icon treemacs-icon-lua "vsc/lua.png" "lua")
(treemacs--setup-icon treemacs-icon-log "vsc/log.png" "log")
(treemacs--setup-icon treemacs-icon-lisp "vsc/lisp.png" "lisp")
(treemacs--setup-icon treemacs-icon-sql "vsc/sql.png" "sql")
(treemacs--setup-icon treemacs-icon-toml "vsc/toml.png" "toml")
(treemacs--setup-icon treemacs-icon-nim "vsc/nim.png" "nim")
(treemacs--setup-icon treemacs-icon-org "vsc/org.png" "org")
(treemacs--setup-icon treemacs-icon-perl "vsc/perl.png" "perl")
(treemacs--setup-icon treemacs-icon-vim "vsc/vim.png" "vimrc" "tridactylrc" "vimperatorrc" "ideavimrc" "vrapperrc")
(treemacs--setup-icon treemacs-icon-depend "vsc/dependencies.png" "cask")
(treemacs--setup-icon treemacs-icon-r "vsc/r.png" "r"))

(defun treemacs--setup-icons ()
"Create and define all icons-related caches, hashes and stashes."
Expand Down

0 comments on commit c5be3b4

Please sign in to comment.