From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#57781: missing wallpaper command Date: Sat, 17 Sep 2022 06:14:11 +0000 Message-ID: <87tu56zfn3.fsf@posteo.net> References: <87fsgvc938.fsf@web.de> <87illpubzu.fsf@melete.silentflame.com> <87a671h861.fsf@web.de> <87mtaz8gin.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13380"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57781@debbugs.gnu.org, Felix , Sean Whitton To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 17 08:22:32 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZRDk-0003KP-22 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 08:22:32 +0200 Original-Received: from localhost ([::1]:55254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZRDj-0004cw-5x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Sep 2022 02:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZRCK-00047T-Cs for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:21:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZRCI-0000FX-Ju for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:21:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZRCI-0006JL-Ew for bug-gnu-emacs@gnu.org; Sat, 17 Sep 2022 02:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Thierry Volpiatto Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Sep 2022 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57781 X-GNU-PR-Package: emacs Original-Received: via spool by 57781-submit@debbugs.gnu.org id=B57781.166339561824145 (code B ref 57781); Sat, 17 Sep 2022 06:21:02 +0000 Original-Received: (at 57781) by debbugs.gnu.org; 17 Sep 2022 06:20:18 +0000 Original-Received: from localhost ([127.0.0.1]:44979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZRBZ-0006HN-UY for submit@debbugs.gnu.org; Sat, 17 Sep 2022 02:20:18 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:35093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZRBU-0006Gz-N3 for 57781@debbugs.gnu.org; Sat, 17 Sep 2022 02:20:16 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B8CC1240026 for <57781@debbugs.gnu.org>; Sat, 17 Sep 2022 08:20:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663395606; bh=96vbdbs7mrFbZ3Jgmm3I5CQK+Q2AKHdrs/SLYPgG9mM=; h=From:To:Cc:Subject:Date:Autocrypt:OpenPGP:From; b=A2wBxa7ZACccqeCzNXouzUjYsnQlGFJC5zGLH1QK1baFyffmKHbQf5UynYy1BnN5b dC+6rzJ+32DyhzNr/dUf7HvQ99Dn/AyK7YyOYCLKnrtAFVKPLBj01EisBD3L4Ki2p1 9LVgcftWHKG5vmpynfNrlABJvN9hjEBb55qrN8XL3Jkf7pcONYXJgHk00wmjTdBQmV 8mLZVYekRFxudPwOYYWsUkLs+SRTP8Sj7OWbvyx6V2ZMeoq1eLsrlyTzEEkySfAB6K qeY7LTZixjOiAdS63ByNRuA92puS2xi9mxnXis98etVXybudnX/30toyrxMYgOwoU0 azTgUR4DLoJww== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MV14z4Zt1z6tnG; Sat, 17 Sep 2022 08:20:03 +0200 (CEST) In-reply-to: Autocrypt: addr=thievol@posteo.net; prefer-encrypt=mutual; keydata= mQGNBF8ylcIBDADG+hy+zR6L4/vbdDDZuSaMmSrU3A5QZJpeBCvxTr7MpzzruZbhLPW1K3R6N2MA edi8Y+C8o27FVRIjpdbaKMGu9je7JV/TbUQYo3SOwCK1vM4LUn4V6ZLzSYkuiEt4eyMoiDdyvN0p kcK6P9x9DCetcEVszXzQg+yzCVrQ2hXWDXWT4M18EC3wtO7RHPouMqGiwBFhBAYErCqFWFxQHkfb tG/4yGyJ58rglb65O3qijjMWvYwcWZun9/7qm8Z4/4mHopmo2zgU+OrptnLSZfkZGz3Y7Uf452xQ GVq0Fv75NPvQru7y+DYVhuVXXyAmGxt+vf4rIiixMBbhKEPjcxEPAa2LTzex2IsTZR+QVG9uDnqC WcgaOEQ58fzXNvNhtwwF/Rgio2XWAJVdmFWS59/k9W58CIUSNKBMZh2XeGdEmtHvDtCxW3z6FJha 36RzOM3fMNNiAGdFZJA84gcdloJR+sHCDTTPT3784fjr+V8An7sI581NGFzkRQqPvEQCZbUAEQEA AbQSdGhpZXZvbEBwb3N0ZW8ubmV0iQHOBBMBCgA4AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA FiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmL3HCoACgkQDsVtFB0W75OVEAv/f6XxmtIFz08fUb8h Bp/zJP6IC4/rhhh+0GMRIRzLN8DK0jV8JCzYdFHiRJOy2lNIOpmrrCmjRRxferc2G42+ePFIsslx hU46VSz1Z83NwIG3mpdYNV5WUTUdgzxExHTNTFCd7NKv0nlHKQa OpenPGP: url=https://posteo.de/keys/thievol@posteo.net.asc; preference=encrypt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:242829 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stefan Kangas writes: > Thierry Volpiatto writes: > >> Don't know if you already added a command for xfce, if not here is what >> I use: >> >> (apply #'call-process "xfconf-query" nil nil nil >> `("-c" >> "xfce4-desktop" "-p" >> "/backdrop/screen0/monitoreDP/workspace0/last-image" "-s" >> ,file)) > > I did not yet have the command, so thank you. I have added this to > wallpaper.el on master now (commit fe7c015b20 or attached patch). > > Do you mind testing to see if it works for you? The xconf-query command is detected and working fine, thanks. Perhaps you can store last wallpapers used and use it as default for the read-file-name? Something like this: diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 4572a8c0628..8426fc4b126 100644 =2D-- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -227,6 +227,8 @@ See also `wallpaper-default-height'.") This is only used when it can't be detected automatically. See also `wallpaper-default-width'.") =20 +(defvar wallpaper-last-used nil) + (defun wallpaper--get-height-or-width (desc fun default) (if (display-graphic-p) (funcall fun) @@ -246,7 +248,10 @@ options `wallpaper-command' and `wallpaper-command-arg= s'. On MS-Windows and Haiku systems, no external command is needed, so the value of `wallpaper-commands' is ignored." (interactive (list (read-file-name "Set desktop background to: " =2D default-directory nil t nil + (and wallpaper-last-used + (file-name-directory + (car (last wallpaper-last-used)= ))) + wallpaper-last-used t nil (lambda (fn) (or (file-directory-p fn) (string-match (image-file-name-= regexp) fn)))))) @@ -257,6 +262,7 @@ so the value of `wallpaper-commands' is ignored." (unless (file-readable-p file) (error "File is not readable: %s" file)) (wallpaper-debug "Using image %S:" file) + (push file wallpaper-last-used) (cond ((eq system-type 'windows-nt) (w32-set-wallpaper file)) ((featurep 'haiku) > [2. text/x-diff; 0001-Support-XFCE-in-wallpaper.el.patch]... =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmMlZxATHHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvk5gtDACH02VB24EK1Q8/7uImYOgcAp/3j9P2 xXTia0/BHmNgQXUFIk5H96ZrqmXjTAUYHXYSaoApmwC9D6JxmOhHdR+czQsBNyvH 83mokvTriAazfVHLfnP3jqBNixboaOoif9L3HsP4gbFMdysM/s3NZHu8/AJdAID6 Uq6d8wbmhB8uaN0qajsSfzczSI/IdzWUp6p2WOW5keJZ8HfP5nT2Ful310kh06+N vwBVR/MgLkpFio66WTl7cB4Se0YLL+CldiJD0BEOFA42vC0d+yfhYWagKvdUMPAn JLdr/rKWh/sIo+Tuh2j8x5oDFtnmkDnc+zn2toMC6juqd2NgqWN2pSW3WzUD3Acx q3OVYE2YG+iM4EwQ4Ycm22zlYW/fPHpK8joEBW4XxFtFIHZbL8voFoJHW1uQgu7L sDwXbODwxxC5+/LnpzujIb205ovnAUW4WEnZ+A4QoXOttd2W2yJwFe+T4nT77pCX ss1Gb1a9G6juD5/Zbl2RTU/Pf8bLw+YOCug= =8rlM -----END PGP SIGNATURE----- --=-=-=--