7 Commits

Author SHA1 Message Date
vinceliuice f6ab2438e1 update 2024-12-17 13:22:01 +08:00
vinceliuice 42c232dfb4 Fixed #236 2024-10-27 12:54:41 +08:00
Vince 24ac05a101 Merge pull request #235 from Ate329/dev
Fix NixOS build failure due to missing files
2024-10-26 14:25:32 +08:00
Zhiyong (Justin) He 92fc1c9686 Update flake.nix
Fix build failure on NixOS
2024-10-26 00:27:15 +03:00
vinceliuice 55aef0cada Update font 2024-10-25 12:23:36 +08:00
vinceliuice 47a6467e27 Merge branch 'master' of github.com:vinceliuice/grub2-themes 2024-10-12 01:02:48 +08:00
vinceliuice faf75d2a7f Update install.sh 2024-10-12 01:02:38 +08:00
28 changed files with 46 additions and 23 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
#! /usr/bin/env bash
grub2-mkfont -o unifont-16.pf2 -s 16 unifont.otf
grub2-mkfont -o unifont-24.pf2 -s 24 unifont.otf
grub2-mkfont -o unifont-32.pf2 -s 32 unifont.otf
Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 14"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
#terminal-left: "0"
#terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"
+4 -4
View File
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 18"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
#terminal-left: "0"
#terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"
@@ -19,7 +19,7 @@ terminal-border: "0"
top = 30%
width = 40%
height = 40%
item_font = "DejaVu Sans Regular 24"
item_font = "Unifont Regular 24"
item_color = "#cccccc"
selected_item_color = "#ffffff"
icon_width = 48
@@ -48,5 +48,5 @@ terminal-border: "0"
id = "__timeout__"
text = "Booting in %d seconds"
color = "#cccccc"
font = "DejaVu Sans Regular 24"
font = "Unifont Regular 24"
}
+4 -4
View File
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 18"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
#terminal-left: "0"
#terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"
@@ -19,7 +19,7 @@ terminal-border: "0"
top = 30%
width = 40%
height = 40%
item_font = "DejaVu Sans Regular 32"
item_font = "Unifont Regular 32"
item_color = "#cccccc"
selected_item_color = "#ffffff"
icon_width = 64
@@ -48,5 +48,5 @@ terminal-border: "0"
id = "__timeout__"
text = "Booting in %d seconds"
color = "#cccccc"
font = "DejaVu Sans Regular 32"
font = "Unifont Regular 32"
}
+2 -2
View File
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 14"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
#terminal-left: "0"
#terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"
+4 -4
View File
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 18"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
#terminal-left: "0"
#terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"
@@ -19,7 +19,7 @@ terminal-border: "0"
top = 30%
width = 40%
height = 40%
item_font = "DejaVu Sans Regular 24"
item_font = "Unifont Regular 24"
item_color = "#cccccc"
selected_item_color = "#ffffff"
icon_width = 48
@@ -48,5 +48,5 @@ terminal-border: "0"
id = "__timeout__"
text = "Booting in %d seconds"
color = "#cccccc"
font = "DejaVu Sans Regular 24"
font = "Unifont Regular 24"
}
+12 -1
View File
@@ -32,7 +32,15 @@
src = "${self}";
buildInputs = [ pkgs.imagemagick ];
installPhase = ''
mkdir -p $out/grub/themes;
mkdir -p $out/grub/themes
# Create placeholder terminal box PNGs that install.sh expects
mkdir -p common
for box in c e n ne nw s se sw w; do
touch common/terminal_box_$box.png
done
# Run the install script
bash ./install.sh \
--generate $out/grub/themes \
--screen ${cfg.screen} \
@@ -44,9 +52,11 @@
rm $out/grub/themes/${cfg.theme}/background.jpg;
${pkgs.imagemagick}/bin/magick ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
fi;
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
fi;
if [ ${pkgs.lib.trivial.boolToString hasBootMenuConfig} == "true" ]; then
sed -i ':again;$!N;$!b again; s/\+ boot_menu {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
@@ -55,6 +65,7 @@
}
EOF
fi;
if [ ${pkgs.lib.trivial.boolToString hasTerminalConfig} == "true" ]; then
sed -i 's/^terminal-.*$//g' $out/grub/themes/${cfg.theme}/theme.txt
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
+13 -6
View File
@@ -97,7 +97,7 @@ generate() {
prompt -i "\n Installing ${theme} ${icon} ${screen} theme..."
# Don't preserve ownership because the owner will be root, and that causes the script to crash if it is ran from terminal by sudo
cp -a --no-preserve=ownership "${REO_DIR}/common/"{*.png,*.pf2} "${THEME_DIR}/${theme}"
cp -a --no-preserve=ownership "${REO_DIR}/common/"*.pf2 "${THEME_DIR}/${theme}"
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${screen}.txt" "${THEME_DIR}/${theme}/theme.txt"
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
@@ -391,14 +391,21 @@ updating_grub() {
grub2-mkconfig -o /boot/grub2/grub.cfg
# Check for Fedora (regular or Atomic)
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
if [[ -f /boot/grub2/grub.cfg ]]; then
prompt -s "Find config file on /boot/grub2/grub.cfg ...\n"
grub2-mkconfig -o /boot/grub2/grub.cfg
# Check for UEFI
elif [[ -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
fi
if [[ -f /boot/grub2/grub.cfg && -f /boot/efi/EFI/fedora/grub.cfg ]]; then
prompt -w "\n Under EFI, GRUB2 looks for its configuration in /boot/efi/EFI/fedora/grub.cfg,\n however the postinstall script of grub2-common installs a small shim which chains to the standard configuration at /boot/grub2/grub.cfg which is generated above.\n To reset this shim to defaults, delete the existing /boot/efi/EFI/fedora/grub.cfg and then reinstall grub2-common."
prompt -i "\n sudo rm -f /boot/efi/EFI/fedora/grub.cfg"
prompt -i "sudo dnf reinstall grub2-common"
fi
fi