mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2026-06-07 20:13:19 +08:00
Compare commits
4 Commits
c47af2ef5d
...
2024-08-19
| Author | SHA1 | Date | |
|---|---|---|---|
| 775e4f7487 | |||
| 8357e49262 | |||
| a69383892e | |||
| 896ca7f9c9 |
@@ -38,7 +38,7 @@ sudo ./install.sh -r -t tela
|
||||
```
|
||||
|
||||
## Installation with NixOS:
|
||||
To use this theme with NixOS you will have to enable [flakes](https://nixos.wiki/wiki/flakes). Before you do this, please inform yourself if you really want to, because flakes are still an unstable feature.
|
||||
To use this theme with NixOS you will have to enable [flakes](https://wiki.nixos.org/wiki/flakes). Before you do this, please inform yourself if you really want to, because flakes are still an unstable feature.
|
||||
|
||||
First you will have to add grub2 to your `flake.nix` file as a new input.
|
||||
```nix
|
||||
|
||||
+18
-3
@@ -158,6 +158,14 @@ install() {
|
||||
#Append GRUB_FONT
|
||||
echo "GRUB_FONT=/boot/grub2/fonts/unicode.pf2" >> /etc/default/grub
|
||||
fi
|
||||
elif [[ -f "/boot/efi/EFI/fedora/fonts/unicode.pf2" ]]; then
|
||||
if grep "GRUB_FONT=" /etc/default/grub 2>&1 >/dev/null; then
|
||||
#Replace GRUB_FONT
|
||||
sed -i "s|.*GRUB_FONT=.*|GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2|" /etc/default/grub
|
||||
else
|
||||
#Append GRUB_FONT
|
||||
echo "GRUB_FONT=/boot/efi/EFI/fedora/fonts/unicode.pf2" >> /etc/default/grub
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -325,6 +333,9 @@ run_dialog() {
|
||||
5) screen="ultrawide2k" ;;
|
||||
*) operation_canceled ;;
|
||||
esac
|
||||
|
||||
# clear
|
||||
echo -e '\0033\0143'
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -342,9 +353,13 @@ updating_grub() {
|
||||
elif has_command zypper || has_command transactional-update; then
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
# Check for Fedora (regular or Atomic)
|
||||
elif has_command dnf || has_command rpm-ostree; then
|
||||
#Check for BIOS
|
||||
if [[ -f /boot/grub2/grub.cfg ]]; then
|
||||
elif has_command dnf || has_command rpm-ostree; then
|
||||
# Check for UEFI
|
||||
if [[ -f /boot/efi/EFI/fedora/grub.cfg ]]; then
|
||||
prompt -s "Find config file on /boot/efi/EFI/fedora/grub.cfg ...\n"
|
||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
# Check for BIOS
|
||||
elif [[ -f /boot/grub2/grub.cfg ]]; then
|
||||
prompt -s "Find config file on /boot/grub2/grub.cfg ...\n"
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user