Skip to content

Commit b5a51ed

Browse files
committed
grub: add menu entries for screenreader, memtest, efi fw setup, reboot, poweroff
- also clean up indentation - set timeout to 15 seconds - play a sound on pc speaker when at grub menu, for accessibility - screenreader option can be selected with `s` hotkey
1 parent faa72f6 commit b5a51ed

1 file changed

Lines changed: 73 additions & 23 deletions

File tree

grub/grub_void.cfg.in

Lines changed: 73 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,94 @@ set pager="1"
33
set locale_dir="(${voidlive})/boot/grub/locale"
44

55
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
6-
insmod all_video
6+
insmod all_video
77
else
8-
insmod efi_gop
9-
insmod efi_uga
10-
insmod video_bochs
11-
insmod video_cirrus
8+
insmod efi_gop
9+
insmod efi_uga
10+
insmod video_bochs
11+
insmod video_cirrus
1212
fi
1313

1414
insmod font
1515

1616
if loadfont "(${voidlive})/boot/grub/fonts/unicode.pf2" ; then
17-
insmod gfxterm
18-
set gfxmode="auto"
19-
20-
terminal_input console
21-
terminal_output gfxterm
22-
23-
insmod png
24-
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
17+
insmod gfxterm
18+
set gfxmode="auto"
19+
20+
terminal_input console
21+
terminal_output gfxterm
22+
23+
insmod png
24+
background_image "(${voidlive})/boot/isolinux/@@SPLASHIMAGE@@"
2525
fi
2626

27+
# Set default menu entry
28+
default=linux
29+
timeout=15
30+
timeout_style=menu
31+
32+
# GRUB init tune for accessibility
33+
play 600 988 1 1319 4
34+
2735
if [ cpuid -l ]; then
28-
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" {
29-
set gfxpayload="keep"
30-
linux (${voidlive})/boot/vmlinuz \
36+
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" --id "linux" {
37+
set gfxpayload="keep"
38+
linux (${voidlive})/boot/vmlinuz \
3139
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
3240
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
3341
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
3442
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
35-
initrd (${voidlive})/boot/initrd
36-
}
37-
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" {
38-
set gfxpayload="keep"
39-
linux (${voidlive})/boot/vmlinuz \
43+
initrd (${voidlive})/boot/initrd
44+
}
45+
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" --id "linuxram" {
46+
set gfxpayload="keep"
47+
linux (${voidlive})/boot/vmlinuz \
4048
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
4149
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
4250
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
4351
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
44-
initrd (${voidlive})/boot/initrd
45-
}
52+
initrd (${voidlive})/boot/initrd
53+
}
54+
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
55+
set gfxpayload="keep"
56+
linux (${voidlive})/boot/vmlinuz \
57+
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
58+
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
59+
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
60+
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin
61+
initrd (${voidlive})/boot/initrd
62+
}
63+
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech (RAM)" --hotkey r --id "linuxa11yram" {
64+
set gfxpayload="keep"
65+
linux (${voidlive})/boot/vmlinuz \
66+
root=live:CDLABEL=VOID_LIVE ro init=/sbin/init \
67+
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
68+
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
69+
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
70+
initrd (${voidlive})/boot/initrd
71+
}
72+
if [ "${grub_platform}" == "efi" ]; then
73+
menuentry "Run Memtest86+ (RAM test)" --id memtest {
74+
set gfxpayload="keep"
75+
linux (${voidlive})/boot/memtest.efi
76+
}
77+
menuentry 'UEFI Firmware Settings' --id uefifw {
78+
fwsetup
79+
}
80+
else
81+
menuentry "Run Memtest86+ (RAM test)" --id memtest {
82+
set gfxpayload="keep"
83+
linux (${voidlive})/boot/memtest.bin
84+
}
85+
fi
86+
87+
menuentry "System restart" --id restart {
88+
echo "System rebooting..."
89+
reboot
90+
}
91+
92+
menuentry "System shutdown" --id poweroff {
93+
echo "System shutting down..."
94+
halt
95+
}
4696
fi

0 commit comments

Comments
 (0)