Skip to content

Commit

Permalink
Merge pull request #3 from nixmaniack/enable-only-on-graphic-display
Browse files Browse the repository at this point in the history
Enable this mode only when display supports grahpic
  • Loading branch information
jtbm37 authored Dec 3, 2016
2 parents ed39660 + c8b81ff commit 0d308b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions all-the-icons-dired.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
(define-minor-mode all-the-icons-dired-mode
"Display all-the-icons icon for each files in a dired buffer."
:lighter " all-the-icons-dired-mode"
(if all-the-icons-dired-mode
(if (and (display-graphic-p) all-the-icons-dired-mode)
(progn
(add-hook 'dired-after-readin-hook 'all-the-icons-dired--display t t)
(when (eq major-mode 'dired-mode)
(all-the-icons-dired--display)))
(add-hook 'dired-after-readin-hook 'all-the-icons-dired--display t t)
(when (eq major-mode 'dired-mode)
(all-the-icons-dired--display)))
(remove-hook 'dired-after-readin-hook 'all-the-icons-dired--display t)
(dired-revert)))

Expand Down

0 comments on commit 0d308b0

Please sign in to comment.