Restore previous wal command on startup

This commit is contained in:
Jeremy Dormitzer 2020-03-31 08:01:52 -04:00
parent 06f77afe0e
commit 3409b47b7c
2 changed files with 10 additions and 3 deletions

View File

@ -28,6 +28,10 @@ if [ -e "$(which virtualenvwrapper.sh)" ]; then
source "$(which virtualenvwrapper.sh)" source "$(which virtualenvwrapper.sh)"
fi fi
if [ -d "$HOME/.cache/wal" ]; then
(cat "$HOME/.cache/wal/sequences" &)
fi
if [ -f ~/.bashrc.local ]; then if [ -f ~/.bashrc.local ]; then
source ~/.bashrc.local source ~/.bashrc.local
fi fi

View File

@ -127,7 +127,7 @@
(defun run-wal (image &optional light?) (defun run-wal (image &optional light?)
(run-shell-command (run-shell-command
(concatenate 'string (concatenate 'string
"wal " "wal -n "
(when light? "-l ") (when light? "-l ")
"-i " (uiop:native-namestring image) " " "-i " (uiop:native-namestring image) " "
"-o " "-o "
@ -137,7 +137,7 @@
(run-wal image)) (run-wal image))
(defcommand wal-light (image) ((:desktop-image "Set desktop background: ")) (defcommand wal-light (image) ((:desktop-image "Set desktop background: "))
(run-wal image )) (run-wal image t))
(define-interactive-keymap wal nil (define-interactive-keymap wal nil
((kbd "l") "wal-light" t) ((kbd "l") "wal-light" t)
@ -215,7 +215,10 @@
(set '*message-window-padding* 4) (set '*message-window-padding* 4)
;; Desktop background ;; Desktop background
(run-commands "wal-light ~/Dropbox/pictures/desktop/coast.jpg") (if (probe-file "~/.cache/wal")
(run-shell-command (format nil "wal -R -o \"~A\""
(uiop:native-namestring "~/bin/run-wal-hooks.sh")))
(run-wal "~/Dropbox/pictures/desktop/coast.jpg" t))
;; Notifications via Dunst ;; Notifications via Dunst
(run-shell-command "/usr/bin/dunst") (run-shell-command "/usr/bin/dunst")