summaryrefslogtreecommitdiff
path: root/.config/emacs/modules
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-17 15:52:43 -0400
committerbd <bdunahu@operationnull.com>2025-03-17 15:52:43 -0400
commit5e8f32776e9e807557be83a8150efa29f43fb063 (patch)
tree156cd99295f7255445cd8df2e038c2c91fae9404 /.config/emacs/modules
parentc9f5cff5c6d7f6876a1474ffc40bd7ec3ee4fb3b (diff)
fix bug with qemu-file handler
Diffstat (limited to '.config/emacs/modules')
-rw-r--r--.config/emacs/modules/bd--files.el10
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