Define StumpWM command to change to random background

This commit is contained in:
Jeremy Dormitzer 2020-03-04 20:00:42 -05:00
parent c78cf80059
commit a7738ecb03

View File

@ -51,6 +51,12 @@
(defcommand org-capture () () (defcommand org-capture () ()
(run-shell-command "emacsclient -a '' -e '(make-orgcapture-frame)'")) (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 ;; Keybindings
(define-key stumpwm:*root-map* (kbd "C-f") "firefox") (define-key stumpwm:*root-map* (kbd "C-f") "firefox")
(define-key stumpwm:*root-map* (kbd "d") "exec rofi -show drun") (define-key stumpwm:*root-map* (kbd "d") "exec rofi -show drun")
@ -82,7 +88,7 @@
(set '*message-window-padding* 4) (set '*message-window-padding* 4)
;; Desktop background ;; 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 ;; Notifications via Dunst
(run-shell-command "/usr/bin/dunst") (run-shell-command "/usr/bin/dunst")