diff options
Diffstat (limited to 'emacs.org')
-rwxr-xr-x | emacs.org | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -310,15 +310,22 @@ Generate a random password between 20 and 40 characters #+begin_src emacs-lisp (defun dired-watch-video () (interactive) - (async-shell-command - (format "mpv \"%s\"" (dired-get-filename)))) + (call-process-shell-command + (format "mpv \"%s\"" (dired-get-filename)) nil 0)) + + (defun dired-set-wallpaper () + "Set NAME as wallpaper." + (interactive) + (call-process-shell-command + (format "feh --bg-scale %s" (dired-get-filename) nil 0))) #+end_src ** Keybindings #+begin_src emacs-lisp (require 'dired) - (define-key dired-mode-map "b" 'dired-up-directory) - (define-key dired-mode-map "v" 'dired-watch-video) - (define-key dired-mode-map "z" 'wdired-change-to-wdired-mode) + (define-key dired-mode-map (kbd "b") 'dired-up-directory) + (define-key dired-mode-map (kbd "v") 'dired-watch-video) + (define-key dired-mode-map (kbd "z") 'wdired-change-to-wdired-mode) + (define-key dired-mode-map (kbd "C-c w") 'dired-set-wallpaper) #+end_src ** All-the-icons #+begin_src emacs-lisp |