如果一个 GRUB 主题托管在 GitHub 中,它很可能有安装程序脚本和卸载程序脚本。让我们以
Modern GRUB Themes
为例。它托管在 GitHub 中。
使用 Git 复刻项目的 GitHub 存储库:
1
| git clone https://github.com/vinceliuice/grub2-themes.git
|
转到项目的文件夹:
运行安装程序脚本:
选择你喜欢的 GRUB 主题背景(例如 tela)。

选择图标样式:

选择你的显示分辨率。

现在选择将会安装和应用的 GRUB 主题。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| Checking for the existence of themes directory...
Installing tela color 1080p theme...
Setting tela as default...
Updating grub config...
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/tela/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-41-generic
Found initrd image: /boot/initrd.img-5.15.0-41-generic
Found linux image: /boot/vmlinuz-5.15.0-39-generic
Found initrd image: /boot/initrd.img-5.15.0-39-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
* All done!
* At the next restart of your computer you will see your new Grub theme: 'tela'
|

重新启动你的系统来查看更改。

这是一个漂亮的 GRUB 主题,前所未见。
你也可以明确地给定主题的名称和屏幕分辨率,像下面一样。
1
| sudo ./install.sh -t whitesur -s 1080p
|
这将应用一个名称为 “Whitesur” 的主题,使用 1080p 屏幕分辨率。你可能会提及到其它的分辨率,例如 2k 、4k 、超宽(ultrawide)、超宽 2k(ultrawide2k) 。如果你不提及分辨率,将默认采用 1080p 。
安装 Tela 主题到 /boot/grub/themes 文件夹:
1
| sudo ./install.sh -b -t whitesur
|
重新启动你的系统来查看更改。

Whitesur GRUB Theme
移除 GRUB 主题
为移除已安装的一个主题,转到项目的复刻目录:
随后,运行:
1
| sudo ./install.sh -r -t tela
|
使用你已安装的主题的名称来替换 tela 。
请注意,每个主题的安装说明可能有所不同。详细地参考每个项目的 GitHub 页面,并相应地安装主题。
总结
有些人喜欢使用艺术化的 Linux 发行版。他们以美化其 Linux 发行版而感到高兴和自豪。如果你是他们中的一员,你可以看看 Gorgeous GRUB 项目来美化你的 GRUB 菜单。
转到 Gorgeous GRUB 主题网站,从列表中选择你最喜欢的主题,并按照每个项目的主页说明来安装和应用 GRUB 主题。
资源
Gorgeous GRUB 的 GitHub 存储库
via:
https://ostechnix.com/change-grub-theme-in-linux/