diff options
author | bd <bdunahu@operationnull.com> | 2024-10-23 23:17:35 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-10-23 23:17:35 -0400 |
commit | ea04c1f4317cff446d6a4753072329f6bc9b627a (patch) | |
tree | c3a8c9295eab6251573ab59a009cc3c612ca9d0b /.config/emacs | |
parent | 0a8bb339c6b698b8d833feaba9485454be9b6fc9 (diff) |
find-file opens images in nsxiv
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/modules/bd--files.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index b55dd4a..e5df266 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -57,6 +57,13 @@ #'bd/mpv) (advice-add 'find-file :around 'bd/video-find-file-wrapper) +;; image +(defun bd/nsxiv (file) + "Open FILE with nsxiv" + (start-process (concat "nsxiv (" (file-name-base file) ")") nil "nsxiv" (expand-file-name file))) +(bd/defun-find-file-wrapper bd/image-find-file-wrapper '("jpg" "jpeg" "png" "webp" "bmp" "ico" "gif" "JPG" "PNG") #'bd/nsxiv) +(advice-add 'find-file :around 'bd/image-find-file-wrapper) + ;;;; transmission (use-package transmission :bind |