-
Notifications
You must be signed in to change notification settings - Fork 4
Customizing
Let's start changing some values in /etc/default/grub:
- Change Grub's resolution:
# Example: GRUB_GFXMODE=1920x1080
GRUB_GFXMODE=<your_screen_resolution>- Remember last entry selected on boot:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=trueGrub uses its own font format called PFF2. You can convert a .ttf font file to .pf2 using grub-mkfont:
# Example: grub-mkfont -o "Ubuntu Bold 20.pf2" --size=20 Ubuntu-Bold.ttf
$ grub-mkfont -o <output> --size=20 <input>Note that the name convention is important. If you face difficulties loading the font later, refer to this link.
Grub assign icons to the entries by looking at their classes in /boot/grub/grub.cfg and searching .png files with the same name inside the icons/ directory. Here's an example:
...will load /boot/grub/themes/lain/icons/arch.png. If you plan to replace these icons, use an 64x64 image. You can resize an image using ImageMagick with the following command:
$ mogrify -resize 64x64 image.pngYou can change the color for all the icons in lain/icons/ with ImageMagick using the following command:
$ cd lain/icons/
# Example: make everything red: mogrify -fill '#FF0000' -colorize 100% *.png
$ mogrify -fill '<new_color>' -colorize 100% *.pngThis theme includes a .fig file in lain/assets/. You can use Figma to import this file.
Note that every part of the theme in lain/theme.txt has a name matching its representation in the Figma file. The same is true for positions and sizes. You can move things around in Figma, copy their positions/sizes and paste in lain/theme.txt, and it will be displayed in Grub exactly the same.
You can also change the frame's size to match your screen's resolution. Just select
in the layers tree and tweak the "Dimensions" property on the right.