From e654106ecf5741c5abdc591ec026104eafa118a3 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Sat, 18 Jun 2022 09:15:01 +0300 Subject: configs/*/grub/grub.cfg: auto-boot after 15 seconds * Set the default boot entry and its timeout. * Add classes to menu entries to allow theming them. Fixes #179 --- configs/baseline/grub/grub.cfg | 8 ++++++-- configs/releng/grub/grub.cfg | 24 ++++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/configs/baseline/grub/grub.cfg b/configs/baseline/grub/grub.cfg index 5fc8d73..3df0b98 100644 --- a/configs/baseline/grub/grub.cfg +++ b/configs/baseline/grub/grub.cfg @@ -14,14 +14,18 @@ if loadfont "${prefix}/fonts/unicode.pf2" ; then terminal_output gfxterm fi -menuentry "Arch Linux (x86_64, UEFI)" { +default=archlinux +timeout=15 +timeout_style=menu + +menuentry "Arch Linux (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img } -menuentry "Arch Linux (x86_64, UEFI) Copy to RAM" { +menuentry "Arch Linux (x86_64, UEFI) Copy to RAM" --class arch --class gnu-linux --class gnu --class os --id 'archlinux-copy-to-ram' { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram diff --git a/configs/releng/grub/grub.cfg b/configs/releng/grub/grub.cfg index 06a67a8..9b78603 100644 --- a/configs/releng/grub/grub.cfg +++ b/configs/releng/grub/grub.cfg @@ -14,18 +14,22 @@ if loadfont "${prefix}/fonts/unicode.pf2" ; then terminal_output gfxterm fi +default=archlinux +timeout=15 +timeout_style=menu + # GRUB init tune for accessibility # play 600 988 1 1319 4 -menuentry "Arch Linux install medium (x86_64, UEFI)" { +menuentry "Arch Linux install medium (x86_64, UEFI)" --class arch --class gnu-linux --class gnu --class os --id 'archlinux' { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img } -menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey=s { +menuentry "Arch Linux install medium with speakup screen reader (x86_64, UEFI)" --hotkey s --class arch --class gnu-linux --class gnu --class os --id 'archlinux-accessibility' { set gfxpayload=keep search --no-floppy --set=root --label %ARCHISO_LABEL% linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% accessibility=on @@ -48,16 +52,16 @@ if [ "${grub_platform}" == "efi" ]; then fi menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' { - fwsetup - } + fwsetup + } fi -menuentry "System shutdown" { - echo "System shutting down..." - halt +menuentry "System shutdown" --class shutdown --class poweroff { + echo "System shutting down..." + halt } -menuentry "System restart" { - echo "System rebooting..." - reboot +menuentry "System restart" --class reboot --class restart { + echo "System rebooting..." + reboot } -- cgit v1.2.3-70-g09d2