From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: New library wallpaper.el pushed to master Date: Wed, 14 Sep 2022 00:04:28 -0700 Message-ID: References: <878rmm1xmx.fsf@yahoo.com> <87zgf2zcgd.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34880"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 14 09:09:49 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 1oYMWr-0008yW-2P for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Sep 2022 09:09:49 +0200 Original-Received: from localhost ([::1]:42938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYMWp-0002kz-5S for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Sep 2022 03:09:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYMRn-0000Pi-Ig for emacs-devel@gnu.org; Wed, 14 Sep 2022 03:04:39 -0400 Original-Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]:36566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYMRj-0001gX-QO for emacs-devel@gnu.org; Wed, 14 Sep 2022 03:04:35 -0400 Original-Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-127ba06d03fso38597220fac.3 for ; Wed, 14 Sep 2022 00:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date; bh=xAYqYwc4r6usof3c8JkBFqS1OsAUF/wFRH7Zi4ZjLe4=; b=oF+hj7fi2BqihL2iinFPTRMzr3+xHLIUVCmYqV6iYX4KdcFwZuef3yExGAkWh7Jgdh R1BTIWTk/UNxmP+9IqckDcSOqGdgFYlb4nHwXCdZbUHJwHzfoaPqYE10jhYHNAzXrFtY egegCGGWO4Jl4wfb7M7s1ar4Yx95Y5pPaEjWd5LgI16WXrzvX6kYYZQz6dJOlxdX3zzo vaCGfAolNycHHqu7hBpmrPyv+7ikB0ytWY9iaHdMyBmBCrdhfU5i/9a9B2cJS/ozJxlt Wx076+NdtirlGjm7wKI860zf0j1jVmrgkUNcEqhkL3TP1f9y98qj/zizMC2U9D979l1v 2CXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date; bh=xAYqYwc4r6usof3c8JkBFqS1OsAUF/wFRH7Zi4ZjLe4=; b=fE9CHC7/g1sgwNkXyvnsPCNPBwZcugWADyPonL9YJwyfodexRiJ2vzokePygG0Ar9m bh7pVBE3BspNK+dtq/g0viZEpgFxyQvFGv6gjamaDwZ9VO79Hxw9o0I+A4j//Sw4zmNW 6Cf/SOYGn4AccrFS7kkrdIGtaJv3zP7psVZeeGtRSEK81LKYOdKivkhSpOsdsoGLwpYT 84XNUq1db5aF5kQ316GQl3eTkMv0H+vNxnK9FjB1m+6tjERJCNGD3zW5r5zFeXKgQav3 q/h1vG2bt/75OwDvpAy+kRlOntpJ02Fm5abm0pQAQNy8slNguM9uQHdEF/W729h2UkeN M7iQ== X-Gm-Message-State: ACgBeo0vVoe9+aVUOXeg9J79FLxuWPeh8B2X5bXOy7uhxKIErCxiZgCt pgYoEE7SNNQRkhbQGMyN4AwxZvnK3u54ZHDNWuB7g8cf X-Google-Smtp-Source: AA6agR5w4TVHSq12lhkwx7YBzbbJAK/iid3jhAlyc2FmC54xwWggi3b5FVVL9pT8IkL5/tteRLgPSGP2c+EL8YtdvYs= X-Received: by 2002:a05:6870:538c:b0:11b:e64f:ee1b with SMTP id h12-20020a056870538c00b0011be64fee1bmr1496123oan.92.1663139069542; Wed, 14 Sep 2022 00:04:29 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 14 Sep 2022 00:04:28 -0700 In-Reply-To: <87zgf2zcgd.fsf@yahoo.com> X-Hashcash: 1:20:220914:luangruo@yahoo.com::YV0ErHTk6gU+hdnw:0YSK Received-SPF: pass client-ip=2001:4860:4864:20::31; envelope-from=stefankangas@gmail.com; helo=mail-oa1-x31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:295298 Archived-At: Po Lu writes: > Po Lu writes: > >> Why does it check `display-graphic-p'? >> Setting the background image should work in a TTY as well. If I'm not mistaken, under X, you would need $DISPLAY to be set for it to work. And that variable is not set by default in a TTY. Testing this on the Linux console, it only works if I do: DISPLAY=:0.0 feh --bg-fill some-image.png My assumption is that $WAYLAND_DISPLAY works similarly (but I've never used Wayland so I have no idea really). Do you have any ideas for how to do this better? I guess that (setenv "DISPLAY" ":0.0") will only work for single-user machines. Maybe that's okay, though. Or maybe we should just check if $DISPLAY and/or $WAYLAND_DISPLAY are set first? Or maybe we should just ignore any errors and let users figure it out? But that seems a bit drastic, perhaps. > BTW, what about actions usually taken to modify the wallpaper such as > scaling, cropping, and offsets? Shouldn't wallpaper-set take several > arguments to specify those? For now, the idea is that the user will be able to configure this by changing `wallpaper-commands'. Ideally, we would have a defcustom to control the default operation while being agnostic of the actual command used. But then you have different capabilities in different software to consider too.