diff options
author | Thanos Apollo <[email protected]> | 2024-04-19 17:18:43 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-04-19 17:18:43 +0300 |
commit | 654e0855904600dcbed0dd356cecd68acc849b50 (patch) | |
tree | 574bce8c9423c2976e37bc7fc89eb53c1a896327 /.emacs.d | |
parent | 314aa06e7190a5b5e6abd14be799f452fb5a9de5 (diff) |
emacs: Fix vm-run & wallpaper commands
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/modules/thanos-commands.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.emacs.d/modules/thanos-commands.el b/.emacs.d/modules/thanos-commands.el index 36e6529..5911e5e 100644 --- a/.emacs.d/modules/thanos-commands.el +++ b/.emacs.d/modules/thanos-commands.el @@ -51,8 +51,8 @@ (read-file-name "ISO: ") nil))) (async-shell-command - (format "qemu-system-x86_64 -enable-kvm -m %s -smp %s -hda %s -vga virtio -device virtio-serial-pci %s" - memory cores image (when iso (concat "-cdrom " iso)))))) + (format "qemu-system-x86_64 -enable-kvm -m %s -smp %s -hda %s -vga virtio -device virtio-serial-pci -netdev user,id=vmnic,hostfwd=tcp::2222-:22 -device e1000,netdev=vmnic %s" + memory cores image (if iso (concat "-cdrom " iso) ""))))) ;; MISC @@ -110,8 +110,8 @@ (defun thanos/wallpaper-set (image) "Set IMAGE as wallpaper, using feh." - (call-process-shell-command - (concat "feh --bg-scale " wallpapers-dir image) nil 0)) + (let ((command (if is-zeus "xwallpaper --output DisplayPort-1 --stretch" "feh --bg-scale"))) + (call-process-shell-command (concat command " " wallpapers-dir image) nil 0))) (defun thanos/wallpaper-random () "Set random wallpaper." @@ -143,8 +143,9 @@ (defun dired-set-wallpaper () "Set NAME as wallpaper using feh." (interactive) - (call-process-shell-command - (format "feh --bg-scale %s" (dired-get-filename)) nil 0)) + (let ((command (if is-zeus "xwallpaper --output DisplayPort-1 --stretch" "feh --bg-scale"))) + (call-process-shell-command + (format "%s %s" command (dired-get-filename)) nil 0))) (defun dired-delete-files-except () "Delete all files inside directory except match." |