From 920bf82445c0e37cca3aea333b15c1aa4cef6e65 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 14 Oct 2016 01:23:36 +0200 Subject: [PATCH] Make dired open PDF and image files in proper programs --- emacs/.emacs.d/init/dired-init.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/emacs/.emacs.d/init/dired-init.org b/emacs/.emacs.d/init/dired-init.org index 17f90a1..8966d71 100644 --- a/emacs/.emacs.d/init/dired-init.org +++ b/emacs/.emacs.d/init/dired-init.org @@ -27,3 +27,17 @@ Add a keybinding to dired buffers to change to wdired. (add-hook 'dired-mode-hook 'oni:dired-add-wdired-keybinding) #+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