From 9ddb08ca1bb0bcd71da57726fc3bafdbc0414e85 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Tue, 3 Mar 2020 14:16:48 +0100 Subject: [PATCH] Added external theming and ISOs configs --- boot/grub2/grub.cfg | 25 +++++++++++++++++++++++-- boot/grub2/isos.cfg | 5 +++++ boot/grub2/theming.cfg | 4 ++++ 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 boot/grub2/isos.cfg create mode 100644 boot/grub2/theming.cfg diff --git a/boot/grub2/grub.cfg b/boot/grub2/grub.cfg index de18218..a8ba021 100644 --- a/boot/grub2/grub.cfg +++ b/boot/grub2/grub.cfg @@ -14,12 +14,20 @@ export imgdevpath rootuuid set isopath="/boot/isos" export isopath +set pager=1 + +if [ -f "${prefix}/theming.cfg" ]; + source "${prefix}/theming.cfg" +fi menuentry "Local Boot" { insmod chain chainloader +1 } +menuentry "Show Drives" { + ls +} menuentry "Enable LVMs" { insmod lvm @@ -28,17 +36,30 @@ menuentry "Enable LVMs" { if [ -f "${prefix}/isos.cfg" ]; then - source "${prefix}/isos.cfg" + menuentry ' ' { // Empty Line + true + } + + menuentry "Inspect Isos" { + echo "Loading Iso Configs" + source "${prefix}/isos.cfg" + } fi -menuentry ' ' { +if [ ${grub_platform} == "efi" ]; then + # place UEFI-only menu entries here +fi + +menuentry ' ' { // Empty Line true } menuentry "Shutdown" --class shutdown { + echo "System shutting down..." halt } menuentry "Reboot" --class shutdown { + echo "System rebooting..." reboot } diff --git a/boot/grub2/isos.cfg b/boot/grub2/isos.cfg new file mode 100644 index 0000000..be812ab --- /dev/null +++ b/boot/grub2/isos.cfg @@ -0,0 +1,5 @@ +if [ -d "${prefix}/isos.d" ]; then + for conf in isos.d/*.cfg; do + source "$conf" + done +fi diff --git a/boot/grub2/theming.cfg b/boot/grub2/theming.cfg new file mode 100644 index 0000000..bfea841 --- /dev/null +++ b/boot/grub2/theming.cfg @@ -0,0 +1,4 @@ + +set theme="${prefix}/themes/stylish_dark/theme.txt" +set icondir="${prefix}/themes/icons" +export theme icondir