From 79de3dd68833b6dd9525d577e983aa0e6bdd9dff Mon Sep 17 00:00:00 2001 From: axtlos Date: Thu, 28 Apr 2022 19:11:15 +0200 Subject: [PATCH] use crystal grub theme, fix #9 --- src/functions/base.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/functions/base.rs b/src/functions/base.rs index 689213b..7969f29 100755 --- a/src/functions/base.rs +++ b/src/functions/base.rs @@ -1,5 +1,6 @@ use crate::internal::exec::*; use crate::internal::*; +use crate::internal::files::append_file; use std::path::PathBuf; pub fn install_base_packages() { @@ -38,7 +39,7 @@ pub fn genfstab() { } pub fn install_bootloader_efi(efidir: PathBuf) { - install::install(vec!["grub", "efibootmgr", "grub-btrfs"]); + install::install(vec!["grub", "efibootmgr", "grub-btrfs", "crystal-grub-theme"]); let efidir = std::path::Path::new("/mnt").join(efidir); let efi_str = efidir.to_str().unwrap(); if !std::path::Path::new(&format!("/mnt{efi_str}")).exists() { @@ -67,6 +68,10 @@ pub fn install_bootloader_efi(efidir: PathBuf) { ), "install grub as efi without --removable", ); + files_eval( + append_file("/mnt/etc/default/grub", "GRUB_THEME=\"/usr/share/grub/themes/crystal/theme.txt\""), + "enable crystal grub theme" + ); exec_eval( exec_chroot( "grub-mkconfig", @@ -77,7 +82,7 @@ pub fn install_bootloader_efi(efidir: PathBuf) { } pub fn install_bootloader_legacy(device: PathBuf) { - install::install(vec!["grub", "grub-btrfs"]); + install::install(vec!["grub", "grub-btrfs", "crystal-grub-theme"]); if !device.exists() { crash(format!("The device {device:?} does not exist"), 1); } @@ -89,6 +94,10 @@ pub fn install_bootloader_legacy(device: PathBuf) { ), "install grub as legacy", ); + files_eval( + append_file("/mnt/etc/default/grub", "GRUB_THEME=\"/usr/share/grub/themes/crystal/theme.txt\""), + "enable crystal grub theme" + ); exec_eval( exec_chroot( "grub-mkconfig",