From a7738ecb03387e3a6c010a5322fe0de4d3072d4f Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 4 Mar 2020 20:00:42 -0500 Subject: [PATCH] Define StumpWM command to change to random background --- stumpwm/.stumpwm.d/init.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stumpwm/.stumpwm.d/init.lisp b/stumpwm/.stumpwm.d/init.lisp index 29378ae..8d12ecc 100644 --- a/stumpwm/.stumpwm.d/init.lisp +++ b/stumpwm/.stumpwm.d/init.lisp @@ -51,6 +51,12 @@ (defcommand org-capture () () (run-shell-command "emacsclient -a '' -e '(make-orgcapture-frame)'")) +(defcommand background-random () () + (run-shell-command (concatenate 'string + "feh --bg-scale " + "\"/home/jdormit/Dropbox/pictures/desktop/" + "$(ls /home/jdormit/Dropbox/pictures/desktop | shuf -n 1)\""))) + ;; Keybindings (define-key stumpwm:*root-map* (kbd "C-f") "firefox") (define-key stumpwm:*root-map* (kbd "d") "exec rofi -show drun") @@ -82,7 +88,7 @@ (set '*message-window-padding* 4) ;; Desktop background -(run-shell-command "feh --bg-scale \"/home/jdormit/Dropbox/pictures/desktop/$(ls /home/jdormit/Dropbox/pictures/desktop | shuf -n 1)\"") +(run-commands "background-random") ;; Notifications via Dunst (run-shell-command "/usr/bin/dunst")