translated

This commit is contained in:
geekpi 2022-08-18 08:39:01 +08:00
parent e099d4e509
commit 2ddab8d98a
2 changed files with 107 additions and 107 deletions

View File

@ -1,107 +0,0 @@
[#]: subject: "Create Your Own Custom Light and Dark Wallpaper for GNOME"
[#]: via: "https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
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 42][1]introduces 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][2]
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)][3]
![Change the XML file][4]
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][5]
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][6]
### 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][7] 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 format][8]because 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][9]
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][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2022/03/gnome-42-release/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sample-light-and-dark-wallpaper-for-demo.jpg
[3]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/tree/main/backgrounds
[4]: https://www.debugpoint.com/?attachment_id=9376
[5]: https://www.debugpoint.com/?attachment_id=9375
[6]: https://www.debugpoint.com/?attachment_id=9374
[7]: https://dynamicwallpaper.club
[8]: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Custom-Light-and-Dark-wallpaper-in-GNOME-transition.gif

View File

@ -0,0 +1,107 @@
[#]: subject: "Create Your Own Custom Light and Dark Wallpaper for GNOME"
[#]: via: "https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
在 GNOME 中创建你自定义的浅色和深色壁纸
======
在 GNOME 桌面中创建自定义浅色和深色壁纸的简单指南。
[GNOME 42][1] 将期待已久的浅色和深色主题引入 GNOME 桌面。它还带来了浅色和深色版壁纸,当你在浅色和深色主题之间切换时,它会自动改变。
因此默认情况下GNOME 会为你提供几组预配置的浅色和深色壁纸。
但是,如果你想要在主题更改时自动更改的不同壁纸怎么办?
以下是在 GNOME 中为浅色和深色主题配置和创建自定义壁纸的方法。
### 如何为 GNOME 创建自定义浅色和深色壁纸
首先,确保桌面有两个版本的壁纸。通常,它们应该是标准的 PNG 或 JPG 图像。例如,我们在演示中使用了以下两个壁纸。
![Sample light and dark wallpaper for demo][2]
但是,如果你没有合适的浅色和深色壁纸并正在寻找更多,我会告诉你如何获取它们或在本指南的末尾准备自己的。
跟着我来。
其次,我们需要为自己创建一个模式文件。壁纸的自动更换由名为 adwaita.xml 的 XML 文件处理,该文件定义了特定的浅色和深色背景标签。因此,我们将为壁纸创建 XML 文件。
为此,从 GitLab 复制 adwaita.xml 的内容并创建一个新的 XML 文件链接在下面。你应该在这个文件中看到两个标签“filename” 和 “filename-dark”。这两个 XML 标记包含两个壁纸的完全限定路径。在这两个标签下添加图片的路径,如下所示。
[从这里下载 XML 文件 (adwaita.xml.in)][3]
![Change the XML file][4]
第三步,使用你想要的任何名称将此文件保存到 **/home/your_name/.local/share/gnome-background-properties**。如果 “gnome-background-properties” 不存在,请创建它们。对此示例,我使用了 my_cool_backgrounds.xml。
![Save the file][5]
都准备好了。最后,打开设置并转到外观选项卡,你应该会看到新壁纸作为选项可见。
选择你的自定义浅色和深色壁纸并享受。
![The appearance tab now has your custom light and dark wallpaper][6]
### 如何下载或制作你的动态壁纸
你一定会想,“谁有时间去寻找和创建白天和夜晚版本的壁纸”?一些网站为你提供现成的动态壁纸,你可以轻松下载和安装。
我推荐的一个网站是 [dynamicwallpaper.club][7],它为 macOS 提供了一些高达 6K 的优秀高质量壁纸。你可以轻松下载它们。
此外,如果你打算从上述网站下载,请记住该网站的图像是 [heic 格式][8],因为该网站适用于 macOS。高效视频编码 (HEIC) 是 Apple 的 HEIF 或高效图像文件格式的专有版本。
你需要一个驱动来查看和转换 Ubuntu 或 Fedora Linux 中的动态 heic 图像。那么,如何将它们转换为适用于 Linux 系统呢?打开终端并运行以下命令来安装驱动。
**Ubuntu 用户**
```
sudo apt install heif-gdk-pixbuf
```
**Fedora 用户**
```
sudo dnf install libheif
```
**仅适用于带有 KDE Plasma 的 Fedora/Ubuntu**没有此插件Plasma 应用无法打开 heic 图像)
```
sudo apt install qt-heif-image-pluginsudo dnf install qt-heif-image-plugin
```
最后,使用你喜欢的图像查看器打开 heic 图像并将其保存为 JPG/PNG。
![Custom Light and Dark wallpaper in GNOME transition][9]
最后,别忘了在下面的评论部分告诉我你是否可以为 GNOME 创建自定义深色和浅色壁纸。
干杯。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2022/03/gnome-42-release/
[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sample-light-and-dark-wallpaper-for-demo.jpg
[3]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/tree/main/backgrounds
[4]: https://www.debugpoint.com/?attachment_id=9376
[5]: https://www.debugpoint.com/?attachment_id=9375
[6]: https://www.debugpoint.com/?attachment_id=9374
[7]: https://dynamicwallpaper.club
[8]: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format
[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Custom-Light-and-Dark-wallpaper-in-GNOME-transition.gif