diff options
Diffstat (limited to '.config/emacs/modules/bd--files.el')
-rw-r--r-- | .config/emacs/modules/bd--files.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index 06a113a..8eab7ed 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -24,10 +24,12 @@ (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) - "-nographic" "-net" "nic" "-net" - "user,hostfwd=tcp:127.0.0.1:2222-:22" "--accel" "kvm" "-m" "4G") - "Running headless.") + (let ((options `("qemu-system" nil "qemu-system-x86_64" ,(expand-file-name file) + "-net" "nic" "-net""user,hostfwd=tcp:127.0.0.1:2222-:22" + "--accel" "kvm" "-m" "4G"))) + (unless (string-match-p "graphic" file) + (setq options (append options (list "-nographic")))) + (apply 'start-process options))) (defun bd/rom (file) "Open FILE with an emulator." (let ((command |