Fix dirvish wallpaper apply command

Signed-off-by: MagicRB <richard@brezak.sk>
This commit is contained in:
MagicRB 2023-10-03 23:48:27 +02:00
parent 8cebc0b293
commit c21340b577
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -138,10 +138,12 @@ In sideview Dirvish buffers, I don't want ~RET~ to narrow to a directory, it mak
(defun dirvish-apply-wallpaper () (defun dirvish-apply-wallpaper ()
(interactive) (interactive)
(let ((filename (or (dired-get-filename) (completing-read)))) (let ((filename (or (dired-get-filename) (completing-read))))
(async-shell-command (format "feh %s" filename)))) (async-shell-command (format "ln -sf %s /nix/persist/home/main/.config/wallpaper && systemctl restart --user wallpaper" filename))))
(defun dirvish-side-obey-display-actions (original-function &rest original-arguments) (defun dirvish-side-obey-display-actions (original-function &rest original-arguments)
(let ((switch-to-buffer-obey-display-actions nil)) (let ((switch-to-buffer-obey-display-actions nil))
(apply original-function original-arguments))) (apply original-function original-arguments)))
(advice-add 'dirvish-side :around #'dirvish-side-obey-display-actions) (advice-add 'dirvish-side :around #'dirvish-side-obey-display-actions)
#+end_src #+end_src
#+RESULTS: