[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: desktop-background.el as a new library?

From: Stefan Kangas
Subject: Re: desktop-background.el as a new library?
Date: Wed, 27 Oct 2021 12:51:24 -0700

Tassilo Horn <tsdh@gnu.org> writes:

> None of the provided commands will work for wayland compositors (I
> think) which are becoming more and more the standard on GNU/Linux.  For
> example, I'm using sway so when $WAYLAND_DISPLAY and $SWAYSOCK are set,
> the background must be set using the swaybg command.  Similarly, with
> GNOME, I'd say it's generally the best bet to set the wallpaper using
> gsettings because that will work with both GNOME on X11 and GNOME on
> Wayland.  But with gsettings, the set wallpaper would be persistent
> whereas all other commands would set the wallpaper only for the current
> session.

Thanks, this is very useful information, and reinforces the argument
that something like this belongs in a library, so that people don't have
to reinvent the wheel all the time.

I guess the only way to do this is adding stuff as it comes up and
improve on this over time.  The fix you pointed out sounds
straightforward: check if $WAYLAND_DISPLAY and $SWAYSOCK are set, and
use swaybg if they are.

Does anyone know how to detect if Gnome is in use?

BTW, there is an important difference, IIUC, with "gsettings" in that it
sets it not just for this session.  Perhaps that is okay, though?  That
just seems to be one of the features that Gnome provides over plain X11.

> That said, I like the idea.  It's just that the program for setting the
> wallpaper is not necessarily a user preference (defcustom) but can also
> be a necessity dictated by the WM/compositor/platform.


I agree that we might want to consider to what extent and how this
should be customizable to the user.  When it really comes down to it,
perhaps most users don't care at all what is being used, and is more
interested in customizing if the background is stretched or tiled out.

On a separate note, I have looked into what third-party packages do, and
it seems really common to just fire and forget a command like
"feh --set-bg".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]