Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
(written by AI)
Added new function grubfm_view, updated global.sh and osdetect.sh, modified rules/generic/dummy.sh and themes/slack/fm.txt, updated ver.txt, and changed update_grub2.sh script.
  • Loading branch information
randompersononinternet69 committed Aug 5, 2024
1 parent b8481df commit 8033fca
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
6 changes: 6 additions & 0 deletions boot/grubfm/func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ function swap_hd01 {
fi;
}

grubfm_view() {
loopback $grubfm_file
grubfm_set -r (loop)
grubfm "(loop)/"
}

unset grubfm_path;
regexp --set=1:grubfm_path '(/.*)$' "${grubfm_file}";
export grubfm_path;
Expand Down
4 changes: 4 additions & 0 deletions boot/grubfm/global.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ hiddenentry " " --hotkey f6 {
configfile ${prefix}/power.sh;
}

hiddenentry " " --hotkey f7 {
configfile ${prefix}/init.sh;
}

if [ -n "${grubfm_current_path}" ];
then
hiddenentry " " --hotkey 0x02000066 {
Expand Down
15 changes: 14 additions & 1 deletion boot/grubfm/osdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,22 @@ if [ -f "(${device})/boot/grub/grub.cfg" ];
fi;
# not tested, but it should work under EFI. Legacy BIOS will fail to load this though
menuentry "Boot Ventoy on ${device} ${info} ${device}" {
terminal_output console
terminal_output console
chainloader (${root})/EFI/BOOT/ventoyx64.efi
}

menuentry "Search for /boot/grubfm/config and load it" {
search --set=user -f -q /boot/grubfm/config
export user
if [ -n "${user}" ];
then
grubfm_set -u "${user}"
source (${user})/boot/grubfm/config
fi;
else
echo Did not find config.
configfile (memdisk)/boot/grubfm/osdetect.sh
}
fi;
fi;
if [ "${grub_platform}" = "efi" ];
Expand Down
1 change: 0 additions & 1 deletion boot/grubfm/rules/generic/dummy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# this script allows access to the other menus in g2fm
source ${prefix}/func.sh;
if [ -f "${theme_fm}" ];
then
Expand Down
5 changes: 5 additions & 0 deletions boot/grubfm/themes/slack/fm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ terminal-box: "term_bkg_*.png"
+ label {text = "[F6]" color = "#ffffff"}
+ image {file = "dock/logout.png"}
}
+ image {file = "dock/space.png"}
+ vbox {
+ label {text = "[F7]" color = "#ffffff"}
+ image {file = "icons/reboot.png"}
}
}

+ hbox {
Expand Down
2 changes: 1 addition & 1 deletion boot/grubfm/ver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e74f3c1c-6b83-45f6-9bd1-63ea2f02fd8d
9582db44-684c-4f60-8d21-fad35bc9d5dd
4 changes: 2 additions & 2 deletions update_grub2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
rm -rf grub
wget https://github.com/a1ive/grub/releases/download/latest/grub2-latest.tar.gz -O grub2-latest.tar.gz
tar -v -xf grub2-latest.tar.gz
echo Extracting files...
tar --overwrite -xf grub2-latest.tar.gz

0 comments on commit 8033fca

Please sign in to comment.