diff options
Diffstat (limited to '.config/emacs/modules/bd--exwm-windowing.el')
-rw-r--r-- | .config/emacs/modules/bd--exwm-windowing.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.config/emacs/modules/bd--exwm-windowing.el b/.config/emacs/modules/bd--exwm-windowing.el index 3b6532b..184c16e 100644 --- a/.config/emacs/modules/bd--exwm-windowing.el +++ b/.config/emacs/modules/bd--exwm-windowing.el @@ -62,13 +62,13 @@ ARG can be one of the following: - file: set the specified file" (interactive "f") (let ((wall (expand-file-name "~/wf/wall/current"))) - (and arg - (cond - ((file-regular-p arg) (copy-file arg wall t)) - ((file-directory-p arg) - (let* ((images (f-files arg (lambda (f) (string-match-p "\\.jpeg\\'" f)))) - (rfile (nth (random (length images)) images))) - (and rfile (copy-file rfile wall t)))))) + (when arg + (cond + ((file-regular-p arg) (copy-file arg wall t)) + ((file-directory-p arg) + (let* ((images (f-files arg (lambda (f) (string-match-p "\\.jpeg\\'" f)))) + (rfile (nth (random (length images)) images))) + (and rfile (copy-file rfile wall t)))))) (start-process "set wallpaper" nil "feh" "--bg-fill" wall) (message "Set wallpaper."))) (set-bg) |