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.devel Subject: Re: master fe7c015b20: Support XFCE in wallpaper.el Date: Mon, 19 Sep 2022 06:06:38 +0000 Message-ID: <87tu53c28w.fsf@posteo.net> References: <166336105908.23797.12319380359602540227@vcs2.savannah.gnu.org> <20220916204419.B124FC00872@vcs2.savannah.gnu.org> <87edwavjyc.fsf@yahoo.com> <87wna1tr7z.fsf@yahoo.com> <87tu551dmo.fsf@posteo.net> <87o7vdtg8r.fsf@yahoo.com> <87y1ugbtet.fsf@posteo.net> <87leqgrmtb.fsf@yahoo.com> 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="15069"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 19 08:26:54 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oaAF4-0003hY-23 for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Sep 2022 08:26:54 +0200 Original-Received: from localhost ([::1]:59554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oaAF2-0006Uk-IG for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Sep 2022 02:26:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaAAw-00041B-1z for emacs-devel@gnu.org; Mon, 19 Sep 2022 02:22:38 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:33069) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaAAt-0007NL-Ci for emacs-devel@gnu.org; Mon, 19 Sep 2022 02:22:37 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 227AB240027 for ; Mon, 19 Sep 2022 08:22:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663568548; bh=z6Q9bEFHX2Xc87XAaTAL11su/rgJoVxbUiYGuW5NoNY=; h=From:To:Cc:Subject:Date:Autocrypt:OpenPGP:From; b=D5oACpdql5AdWFVKUpBeRAfs6k55d1vlTnu98qgzQ4qbQy8eoG5e46Q3NfimfjMH6 ZTF3/Qgv28o8k67zVJyxwLgb9dMM1+A2UKULzep9lEdbsMHoylWJpUiaVsP/aj2gqY mnY+rTk9Ri7A0Qu1vX5e/XbXlLW2/0bapm3hPthjqbf4arYOdL6TumwklKD6QXtrMW p6FdkhUWaV2nLhBK5CVoU0+lAyKoyeP/GBuqRDj//D6z0pa4GUklM+RweDDn7+/lhs 2NO+N/dVlrz/DRk2wkcG6df0Lu6iSZGItqZtiyoT+LddRp0fnF58HGKxfVhgk2e+IV rgNWVaS5UeyuA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MWF2p0GjNz6tm4; Mon, 19 Sep 2022 08:22:25 +0200 (CEST) In-reply-to: <87leqgrmtb.fsf@yahoo.com> 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 Received-SPF: pass client-ip=185.67.36.65; envelope-from=thievol@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295617 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Po Lu writes: > Thierry Volpiatto writes: > >> Po Lu writes: >> >>> Thierry Volpiatto writes: >>> >>>> Here the command fails if you specify the workspace, it works only with >>>> "worspace0". >>> >>> But that's because you only have workspace 1 displayed, right? >> >> No, if emacs is on workspace0 and I use: >> "/backdrop/screen0/monitoreDP/workspace0/last-image" >> wallpaper is modified as expected.=20 >> >> Then if emacs is on workspace2 and I use: >> "/backdrop/screen0/monitoreDP/workspace2/last-image" >> Command exit with 0 status but wallpaper is not modified, but if I use: >> "/backdrop/screen0/monitoreDP/workspace0/last-image" again (always from >> workspace2), wallpaper is modified as expected. >> >> I can verify this with this command which monitor the desktop change: >> >> xfconf-query -c xfce4-desktop -m >> >> =3D> Commencer =C3=A0 surveiller le canal =C2=AB=C2=A0xfce4-desktop= =C2=A0=C2=BB=C2=A0: >> >> then I go to workspace4, modify wallpaper with mouse and the usual xfce >> interface for this, go back in workspace1 an look at output: >> I have now: >> >> Commencer =C3=A0 surveiller le canal =C2=AB=C2=A0xfce4-desktop=C2=A0= =C2=BB=C2=A0: >> >> d=C3=A9finir: /backdrop/screen0/monitoreDP/workspace0/last-image >> >> unfortunately this command is interactive :-( > > But here is how Thunar, the XFCE file manager, sets the backdrop: > > image_path_prop =3D g_strdup_printf("/backdrop/screen%d/monitor= %s/workspace%d/last-image", screen_nr, monitor_name, workspace); > image_style_prop =3D g_strdup_printf("/backdrop/screen%d/monito= r%s/workspace%d/image-style", screen_nr, monitor_name, workspace); Yes, sure it is working from thunar. But here from emacs with it specified, the command output with 0 but the background is not changed unless I hardcode workspace to 0.=20 Here the function used with its Edebug output: (defun tv/change-xfce-background (file) (let* ((screen (frame-parameter (selected-frame) 'display)) (monitor (assoc-default 'name (car (display-monitor-attributes-lis= t)))) (desktop (x-window-property "_NET_CURRENT_DESKTOP" nil "CARDINAL" = 0 nil t)) (prop (format "/backdrop/screen%s/monitor%s/workspace%s/last-im= age" (substring screen (1- (length screen))) monitor desktop ))) (if (=3D (apply #'call-process "xfconf-query" nil nil nil `("-c" "xfce4-desktop" "-p" ,prop "-s" ,file)) 0) (message "Background changed successfully to %s" (helm-basename fil= e)) (message "Failed to change background")))) Edebug: tv/change-xfce-background tv/change-xfce-background Result: # Result: ":0.0" Result: (((name . "eDP") (geometry 0 0 1920 1080) (workarea 0 0 1920 1080) = (mm-size 309 174) (frames #) (source . "XRandr"))) Result: ((name . "eDP") (geometry 0 0 1920 1080) (workarea 0 0 1920 1080) (= mm-size 309 174) (frames #) (source . "XRandr")) Result: "eDP" Result: 2 (#o2, #x2, ?\C-b) Result: ":0.0" Result: ":0.0" Result: 4 (#o4, #x4, ?\C-d) Result: 3 (#o3, #x3, ?\C-c) Result: "0" Result: "eDP" Result: 2 (#o2, #x2, ?\C-b) Result: "/backdrop/screen0/monitoreDP/workspace2/last-image" Result: call-process Result: "/backdrop/screen0/monitoreDP/workspace2/last-image" Result: "/home/thierry/backgrounds/Cyclosys.jpg" Result: ("-c" "xfce4-desktop" "-p" "/backdrop/screen0/monitoreDP/workspace2= /last-image" "-s" "/home/thierry/backgrounds/Cyclosys.jpg") Result: 0 (#o0, #x0, ?\C-@) Result: t Result: "/home/thierry/backgrounds/Cyclosys.jpg" Result: "Cyclosys.jpg" Background changed successfully to Cyclosys.jpg Result: "Background changed successfully to Cyclosys.jpg" =2D-=20 Thierry --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHHBAEBCgAxFiEEI9twfRN7r3nig/xwDsVtFB0W75MFAmMoCp8THHRoaWV2b2xA cG9zdGVvLm5ldAAKCRAOxW0UHRbvkx7gC/wJBnpObLuRQyNr0IPuKnFtovG0SSJT nPpfLfI1dt8FltpRNo/ARe6mcRCp3jOPWRKs2bK/2nz+lEqKq9dIbM3wrZPII5Q+ s8TcfOwZqoEIrhQwdJcq9w/XQmpy7KetU0DVdDqQ+zxb89VPKiqDfwxeYp0V62hQ HQ+57UnOoXGqUFLK5aZf2gCRp2OcMkmISRRO6gtN7SVH73WJlRMsiT+i4sgxye35 2cV6WGVGclfPh8PiQ5LeYlyFHjQMqCeDqH9wRXi39r9QToRCxFPgR2jTmvG3v6d2 IQUT3VM2nu3Y3ZitiGEintNCVjRdguhZC1s/w+bhXTqJn7ath8mz6kZCn/frAMfG RhkDIy412UcqcYV0qdyKYY+QCoSl59Q2ayLhpJi3OKCMUmOBAyTEuBug3PqHS0d5 G7kadwfFa2RReFizeElznh1wQkQo66cEpnJN04vGYDwOQlVKGRY+PWZ48xpmUJQe Uca0TKqsSRAQdF/Yw1jauFQI8aw3B7nNw/U= =Truy -----END PGP SIGNATURE----- --=-=-=--