Skip to content

Commit

Permalink
Add an icon for helm buffers.
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed May 10, 2019
1 parent 09bbe95 commit 9587569
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ The `doom-modeline` was designed for minimalism, and offers:
![package](https://user-images.githubusercontent.com/140797/57503916-e769d380-7324-11e9-906d-44c79f7408a3.png
"Package")

![info](https://user-images.githubusercontent.com/140797/57504082-9d352200-7325-11e9-94e4-9f89e1f63190.png
![info](https://user-images.githubusercontent.com/140797/57506248-d96c8080-732d-11e9-8167-644c8fc4e0db.png
"Info")

![helm](https://user-images.githubusercontent.com/140797/57504021-5515ff80-7325-11e9-92b4-5c0213fa1ba3.png
![helm](https://user-images.githubusercontent.com/140797/57506112-6531dd00-732d-11e9-8a5e-22166f42dd4c.png
"Helm")

## Install
Expand Down
5 changes: 5 additions & 0 deletions doom-modeline-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,11 @@ Given ~/Projects/FOSS/emacs/lisp/comint.el
(when doom-modeline-icon
(apply #'all-the-icons-alltheicon args)))

(defun doom-modeline-icon-fileicon (&rest args)
"Display fileicon via ARGS."
(when doom-modeline-icon
(apply #'all-the-icons-fileicon args)))

(defun doom-modeline-icon-for-mode (&rest args)
"Display icon for major mode via ARGS."
(when doom-modeline-icon
Expand Down
5 changes: 3 additions & 2 deletions doom-modeline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ buffer where knowing the current project directory is important."
:face face
:v-adjust -0.05
:height 1.25)
(if (display-graphic-p) " ")
(if doom-modeline-icon " ")
(propertize (abbreviate-file-name default-directory) 'face face))))

;;
Expand Down Expand Up @@ -2136,6 +2136,8 @@ The cdr can also be a function that returns a name to use.")
(when (bound-and-true-p helm-alive-p)
(concat
" "
(doom-modeline-icon-fileicon "elisp" :height 1.0 :v-adjust -0.1 :face 'all-the-icons-dpurple)
(if doom-modeline-icon " ")
(propertize
(let ((custom (cdr (assoc (buffer-name) doom-modeline--helm-buffer-ids)))
(case-fold-search t)
Expand Down Expand Up @@ -2187,7 +2189,6 @@ The cdr can also be a function that returns a name to use.")
(eq 1 (cdr (assq 'follow doom-modeline--helm-current-source))))
"HF"))


(provide 'doom-modeline-segments)

;;; doom-modeline-segments.el ends here

0 comments on commit 9587569

Please sign in to comment.