]> git.eshelyaron.com Git - emacs.git/commit
Fix setting the wallpaper with "swaybg" and "wbg"
authorStefan Kangas <stefankangas@gmail.com>
Fri, 7 Oct 2022 20:07:09 +0000 (22:07 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Fri, 7 Oct 2022 20:07:09 +0000 (22:07 +0200)
commit5e83c0117e822536aea4bd5db8f97ab7e9224ec3
tree4922a6128d3a2b129ad08e221b4927b3e60795fd
parentd6831d1b0a18882d688a842721dd1592884a06e2
Fix setting the wallpaper with "swaybg" and "wbg"

* lisp/image/wallpaper.el (wallpaper-setter): Add 'init-action'
and 'detach' fields to structure.
(wallpaper--init-action-kill): New helper function.
(wallpaper--default-setters): Use above new fields for "swaybg" and
"wbg", to start/restart the corresponding processes as needed.
(wallpaper-default-set-function): Call 'init-action' function if
there is one.  If 'detach', use 'call-process' instead of
'start-process'.  (Bug#57781)

* test/lisp/image/wallpaper-tests.el (wallpaper--find-setter)
(wallpaper--find-setter/call-predicate)
(wallpaper--find-setter/set-current-setter)
(wallpaper-set/runs-command, wallpaper-set/runs-command/detach)
(wallpaper-set/calls-init-action)
(wallpaper-set/calls-wallpaper-set-function): New tests.
lisp/image/wallpaper.el
test/lisp/image/wallpaper-tests.el