Make dired open PDF and image files in proper programs

This commit is contained in:
Tom Willemse 2016-10-14 01:23:36 +02:00
parent 5d64560cec
commit 920bf82445

View file

@ -27,3 +27,17 @@ Add a keybinding to dired buffers to change to wdired.
(add-hook 'dired-mode-hook 'oni:dired-add-wdired-keybinding) (add-hook 'dired-mode-hook 'oni:dired-add-wdired-keybinding)
#+END_SRC #+END_SRC
Open PDF files in zathura.
#+BEGIN_SRC emacs-lisp
(add-to-list 'dired-guess-shell-alist-user
`(,(rx ".pdf" eos) "zathura"))
#+END_SRC
Open Jpeg, Gif and PNG files in feh.
#+BEGIN_SRC emacs-lisp
(add-to-list 'dired-guess-shell-alist-user
`(,(rx (or ".jpg" ".jpeg" ".png" ".gif") eos) "feh"))
#+END_SRC