diff options
Diffstat (limited to '.config/emacs/modules')
-rw-r--r-- | .config/emacs/modules/bd--files.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index 84d99e7..70deefc 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -22,6 +22,10 @@ (defun bd/nsxiv (file) "Open FILE with nsxiv." (start-process "nsxiv" nil "nsxiv" (expand-file-name file))) +(defun bd/qemu (file) + "Open FILE with QEMU." + (start-process "qemu-system" nil "qemu-system-x86_64" (expand-file-name file) + "--accel" "kvm" "-m" "4G")) (defun bd/rom (file) "Open FILE with an emulator." (let ((command @@ -49,6 +53,8 @@ ((string-match (regexp-opt '("jpg" "jpeg" "png" "webp" "ico" "gif" "JPG" "PNG")) ext) (bd/open-with-function #'bd/nsxiv)) + ((string-match (regexp-opt '("qcow2")) ext) + (bd/open-with-function #'bd/qemu)) ((string-match (regexp-opt '("gba" "z64" "n64" "sfc")) ext) (bd/open-with-function #'bd/rom)) (t (apply f args))))) |