TranslateProject/sources/tech/20220814 Create Your Own Custom Light and Dark Wallpaper for GNOME.md
2022-08-16 08:34:32 +08:00

5.1 KiB
Raw Blame History

Create Your Own Custom Light and Dark Wallpaper for GNOME

An easy guide on creating your custom light and dark wallpaper for the GNOME desktop.

GNOME 42introduces the much-awaited light and dark theme to GNOME Desktop. It also brings the light and dark version of wallpaper, which automatically changes when you switch between light and dark themes.

So, by default, GNOME gives you a few sets of pre-configured light and dark wallpapers.

But what if you want a different wallpaper that changes automatically when the theme changes?

Heres how to configure and create your custom wallpaper for light and dark themes in GNOME.

How to create custom light and dark wallpaper for GNOME

Firstly, make sure you have two versions of wallpaper handy with you. In general, they should be standard PNG or JPG images. For example, we used below two wallpapers for this demo.

Sample light and dark wallpaper for demo

But if you do not have proper light and dark wallpaper and looking for more, I will let you know how to get them or prepare your own at the end of this guide.

Stay with me.

Second, we need to create a schema file for our own. The automatic changing of wallpaper is handled by an XML file called adwaita.xml, which defines specific light and dark background tags. So, we will create our XML file for the wallpapers.

To do that, copy the contents of adwaita.xml from GitLab and create a new XML file (the link is down below). You should see two tags inside this file “filename” and “filename-dark”. These two XML tags contain the fully qualified path of both wallpapers. Add the path to your images under these two tags, as shown below.

Download the XML file from here (adwaita.xml.in)

Change the XML file

Third, save this file to /home/your_name/.local/share/gnome-background-properties with any name you want. If the “gnome-background-properties” are not there, create them. For this example, I used my_cool_backgrounds.xml.

Save the file

And you are all set. Finally, open the settings and go to the Appearance tab, and you should see the new wallpapers visible as an option.

Select your custom light and dark wallpaper and enjoy.

The appearance tab now has your custom light and dark wallpaper

How to download or make your dynamic wallpaper

You must think, “who has the time to find and create both day and night versions of wallpaper”? Several websites give you dynamic wallpapers ready-made that you can easily download and install.

One website I would recommend is dynamicwallpaper.club which has some excellent high-quality wallpapers up to 6K for macOS. And you can easily download them.

Additionally, if you plan to download from the above website, remember that the sites images are in heic formatbecause the website is for macOS. The High-Efficiency Video Coding (HEIC) is Apples proprietary version of the HEIF or High-Efficiency Image File format.

You need a driver to view and convert the dynamic heic images in Ubuntu or Fedora Linux. So, how do you convert them to Linux systems? Open a terminal and run the below commands to install the driver.

Ubuntu users

sudo apt install heif-gdk-pixbuf

Fedora users

sudo dnf install libheif

For Fedora/Ubuntu with KDE Plasma Only (without this plugin, Plasma apps cant open heic images)

sudo apt install qt-heif-image-pluginsudo dnf install qt-heif-image-plugin

Finally, open the heic image with your favourite image viewer and save it as JPG/PNG.

Custom Light and Dark wallpaper in GNOME – transition

Lastly, dont forget to let me know below in the comment section whether you can create your own custom dark and light wallpaper for GNOME.

Cheers.


via: https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/

作者:Arindam 选题:lkxed 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出