Compare commits
12 Commits
47a6467e27
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 80dd04ddf3 | |||
| 8f30385f55 | |||
| 6f235a8bc5 | |||
| 03d8c9cf0d | |||
| 6c26f99622 | |||
| 739cddf60f | |||
| 7cf2f0918f | |||
| f6ab2438e1 | |||
| 42c232dfb4 | |||
| 24ac05a101 | |||
| 92fc1c9686 | |||
| 55aef0cada |
@@ -86,7 +86,7 @@ After that, you can configure the theme as shown below. In this example it is in
|
|||||||
- Finally, run `grub-mkconfig -o /boot/grub/grub.cfg` to update your grub config
|
- Finally, run `grub-mkconfig -o /boot/grub/grub.cfg` to update your grub config
|
||||||
|
|
||||||
### Setting a custom background:
|
### Setting a custom background:
|
||||||
- Make sure you have `imagemagick` installed, or at least something that provides `convert`
|
- Make sure you have `imagemagick` installed, or at least something that provides `convert` or `magick`
|
||||||
- Find the resolution of your display, and make sure your background matches the resolution
|
- Find the resolution of your display, and make sure your background matches the resolution
|
||||||
- 1920x1080 >> 1080p
|
- 1920x1080 >> 1080p
|
||||||
- 2560x1080 >> ultrawide
|
- 2560x1080 >> ultrawide
|
||||||
|
|||||||
@@ -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
|
||||||
|
Before Width: | Height: | Size: 976 B |
|
Before Width: | Height: | Size: 952 B |
|
Before Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 952 B |
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
terminal-font: "Terminus Regular 14"
|
terminal-font: "Terminus Regular 14"
|
||||||
terminal-box: "terminal_box_*.png"
|
terminal-box: "terminal_box_*.png"
|
||||||
terminal-left: "0"
|
#terminal-left: "0"
|
||||||
terminal-top: "0"
|
#terminal-top: "0"
|
||||||
terminal-width: "100%"
|
terminal-width: "100%"
|
||||||
terminal-height: "100%"
|
terminal-height: "100%"
|
||||||
terminal-border: "0"
|
terminal-border: "0"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
terminal-font: "Terminus Regular 18"
|
terminal-font: "Terminus Regular 18"
|
||||||
terminal-box: "terminal_box_*.png"
|
terminal-box: "terminal_box_*.png"
|
||||||
terminal-left: "0"
|
#terminal-left: "0"
|
||||||
terminal-top: "0"
|
#terminal-top: "0"
|
||||||
terminal-width: "100%"
|
terminal-width: "100%"
|
||||||
terminal-height: "100%"
|
terminal-height: "100%"
|
||||||
terminal-border: "0"
|
terminal-border: "0"
|
||||||
@@ -19,7 +19,7 @@ terminal-border: "0"
|
|||||||
top = 30%
|
top = 30%
|
||||||
width = 40%
|
width = 40%
|
||||||
height = 40%
|
height = 40%
|
||||||
item_font = "DejaVu Sans Regular 24"
|
item_font = "Unifont Regular 24"
|
||||||
item_color = "#cccccc"
|
item_color = "#cccccc"
|
||||||
selected_item_color = "#ffffff"
|
selected_item_color = "#ffffff"
|
||||||
icon_width = 48
|
icon_width = 48
|
||||||
@@ -48,5 +48,5 @@ terminal-border: "0"
|
|||||||
id = "__timeout__"
|
id = "__timeout__"
|
||||||
text = "Booting in %d seconds"
|
text = "Booting in %d seconds"
|
||||||
color = "#cccccc"
|
color = "#cccccc"
|
||||||
font = "DejaVu Sans Regular 24"
|
font = "Unifont Regular 24"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
terminal-font: "Terminus Regular 18"
|
terminal-font: "Terminus Regular 18"
|
||||||
terminal-box: "terminal_box_*.png"
|
terminal-box: "terminal_box_*.png"
|
||||||
terminal-left: "0"
|
#terminal-left: "0"
|
||||||
terminal-top: "0"
|
#terminal-top: "0"
|
||||||
terminal-width: "100%"
|
terminal-width: "100%"
|
||||||
terminal-height: "100%"
|
terminal-height: "100%"
|
||||||
terminal-border: "0"
|
terminal-border: "0"
|
||||||
@@ -19,7 +19,7 @@ terminal-border: "0"
|
|||||||
top = 30%
|
top = 30%
|
||||||
width = 40%
|
width = 40%
|
||||||
height = 40%
|
height = 40%
|
||||||
item_font = "DejaVu Sans Regular 32"
|
item_font = "Unifont Regular 32"
|
||||||
item_color = "#cccccc"
|
item_color = "#cccccc"
|
||||||
selected_item_color = "#ffffff"
|
selected_item_color = "#ffffff"
|
||||||
icon_width = 64
|
icon_width = 64
|
||||||
@@ -48,5 +48,5 @@ terminal-border: "0"
|
|||||||
id = "__timeout__"
|
id = "__timeout__"
|
||||||
text = "Booting in %d seconds"
|
text = "Booting in %d seconds"
|
||||||
color = "#cccccc"
|
color = "#cccccc"
|
||||||
font = "DejaVu Sans Regular 32"
|
font = "Unifont Regular 32"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
terminal-font: "Terminus Regular 14"
|
terminal-font: "Terminus Regular 14"
|
||||||
terminal-box: "terminal_box_*.png"
|
terminal-box: "terminal_box_*.png"
|
||||||
terminal-left: "0"
|
#terminal-left: "0"
|
||||||
terminal-top: "0"
|
#terminal-top: "0"
|
||||||
terminal-width: "100%"
|
terminal-width: "100%"
|
||||||
terminal-height: "100%"
|
terminal-height: "100%"
|
||||||
terminal-border: "0"
|
terminal-border: "0"
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ desktop-image: "background.jpg"
|
|||||||
desktop-color: "#000000"
|
desktop-color: "#000000"
|
||||||
terminal-font: "Terminus Regular 18"
|
terminal-font: "Terminus Regular 18"
|
||||||
terminal-box: "terminal_box_*.png"
|
terminal-box: "terminal_box_*.png"
|
||||||
terminal-left: "0"
|
#terminal-left: "0"
|
||||||
terminal-top: "0"
|
#terminal-top: "0"
|
||||||
terminal-width: "100%"
|
terminal-width: "100%"
|
||||||
terminal-height: "100%"
|
terminal-height: "100%"
|
||||||
terminal-border: "0"
|
terminal-border: "0"
|
||||||
@@ -19,7 +19,7 @@ terminal-border: "0"
|
|||||||
top = 30%
|
top = 30%
|
||||||
width = 40%
|
width = 40%
|
||||||
height = 40%
|
height = 40%
|
||||||
item_font = "DejaVu Sans Regular 24"
|
item_font = "Unifont Regular 24"
|
||||||
item_color = "#cccccc"
|
item_color = "#cccccc"
|
||||||
selected_item_color = "#ffffff"
|
selected_item_color = "#ffffff"
|
||||||
icon_width = 48
|
icon_width = 48
|
||||||
@@ -48,5 +48,5 @@ terminal-border: "0"
|
|||||||
id = "__timeout__"
|
id = "__timeout__"
|
||||||
text = "Booting in %d seconds"
|
text = "Booting in %d seconds"
|
||||||
color = "#cccccc"
|
color = "#cccccc"
|
||||||
font = "DejaVu Sans Regular 24"
|
font = "Unifont Regular 24"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,15 @@
|
|||||||
src = "${self}";
|
src = "${self}";
|
||||||
buildInputs = [ pkgs.imagemagick ];
|
buildInputs = [ pkgs.imagemagick ];
|
||||||
installPhase = ''
|
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 \
|
bash ./install.sh \
|
||||||
--generate $out/grub/themes \
|
--generate $out/grub/themes \
|
||||||
--screen ${cfg.screen} \
|
--screen ${cfg.screen} \
|
||||||
@@ -44,9 +52,11 @@
|
|||||||
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
rm $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
${pkgs.imagemagick}/bin/magick ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
|
${pkgs.imagemagick}/bin/magick ${splashImage} $out/grub/themes/${cfg.theme}/background.jpg;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString cfg.footer} == "false" ]; then
|
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;
|
sed -i ':again;$!N;$!b again; s/\+ image {[^}]*}//g' $out/grub/themes/${cfg.theme}/theme.txt;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString hasBootMenuConfig} == "true" ]; then
|
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;
|
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
|
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
@@ -55,6 +65,7 @@
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ ${pkgs.lib.trivial.boolToString hasTerminalConfig} == "true" ]; then
|
if [ ${pkgs.lib.trivial.boolToString hasTerminalConfig} == "true" ]; then
|
||||||
sed -i 's/^terminal-.*$//g' $out/grub/themes/${cfg.theme}/theme.txt
|
sed -i 's/^terminal-.*$//g' $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
cat << EOF >> $out/grub/themes/${cfg.theme}/theme.txt
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ generate() {
|
|||||||
prompt -i "\n Installing ${theme} ${icon} ${screen} theme..."
|
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
|
# 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}/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"
|
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
||||||
|
|
||||||
@@ -116,13 +116,18 @@ generate() {
|
|||||||
|
|
||||||
# Determine which configuration file and assets to use
|
# Determine which configuration file and assets to use
|
||||||
if [[ -n "$custom_resolution" ]]; then
|
if [[ -n "$custom_resolution" ]]; then
|
||||||
|
if has_command apt || has_command pacman || has_command eopkg; then
|
||||||
|
install_depends imagemagick
|
||||||
|
else
|
||||||
|
install_depends ImageMagick
|
||||||
|
fi
|
||||||
asset_type=$(get_asset_type "$custom_resolution")
|
asset_type=$(get_asset_type "$custom_resolution")
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${asset_type}.txt" "${THEME_DIR}/${theme}/theme.txt"
|
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${asset_type}.txt" "${THEME_DIR}/${theme}/theme.txt"
|
||||||
# Replace resolution in theme.txt
|
# Replace resolution in theme.txt
|
||||||
sed -i "s/[0-9]\+x[0-9]\+/${custom_resolution}/" "${THEME_DIR}/${theme}/theme.txt"
|
sed -i "s/[0-9]\+x[0-9]\+/${custom_resolution}/" "${THEME_DIR}/${theme}/theme.txt"
|
||||||
# Use appropriate background as base and resize it
|
# Use appropriate background as base and resize it
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${asset_type}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${asset_type}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
||||||
convert "${THEME_DIR}/${theme}/background.jpg" -resize ${custom_resolution}^ -gravity center -extent ${custom_resolution} "${THEME_DIR}/${theme}/background.jpg"
|
magick "${THEME_DIR}/${theme}/background.jpg" -resize ${custom_resolution}^ -gravity center -extent ${custom_resolution} "${THEME_DIR}/${theme}/background.jpg"
|
||||||
else
|
else
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${screen}.txt" "${THEME_DIR}/${theme}/theme.txt"
|
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"
|
cp -a --no-preserve=ownership "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
||||||
@@ -130,9 +135,14 @@ generate() {
|
|||||||
|
|
||||||
# Use custom background.jpg as grub background image
|
# Use custom background.jpg as grub background image
|
||||||
if [[ -f "${REO_DIR}/background.jpg" ]]; then
|
if [[ -f "${REO_DIR}/background.jpg" ]]; then
|
||||||
|
if has_command apt || has_command pacman || has_command eopkg; then
|
||||||
|
install_depends imagemagick
|
||||||
|
else
|
||||||
|
install_depends ImageMagick
|
||||||
|
fi
|
||||||
prompt -w "\n Using custom background.jpg as grub background image..."
|
prompt -w "\n Using custom background.jpg as grub background image..."
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
cp -a --no-preserve=ownership "${REO_DIR}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
||||||
convert -auto-orient "${THEME_DIR}/${theme}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
|
magick "${THEME_DIR}/${theme}/background.jpg" -auto-orient "${THEME_DIR}/${theme}/background.jpg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Determine which assets to use based on custom resolution or screen
|
# Determine which assets to use based on custom resolution or screen
|
||||||
@@ -213,11 +223,8 @@ install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if grep "GRUB_BACKGROUND=" /etc/default/grub 2>&1 >/dev/null; then
|
if grep "GRUB_BACKGROUND=" /etc/default/grub 2>&1 >/dev/null; then
|
||||||
#Replace GRUB_BACKGROUND
|
# remove GRUB_BACKGROUND
|
||||||
sed -i "s|.*GRUB_BACKGROUND=.*|GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"|" /etc/default/grub
|
sed -i "s|.*GRUB_BACKGROUND=.*||" /etc/default/grub
|
||||||
else
|
|
||||||
#Append GRUB_BACKGROUND
|
|
||||||
echo "GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"" >> /etc/default/grub
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure the right resolution for grub is set
|
# Make sure the right resolution for grub is set
|
||||||
@@ -267,10 +274,18 @@ install() {
|
|||||||
|
|
||||||
#Check if password is cached (if cache timestamp has not expired yet)
|
#Check if password is cached (if cache timestamp has not expired yet)
|
||||||
elif sudo -n true 2> /dev/null && echo; then
|
elif sudo -n true 2> /dev/null && echo; then
|
||||||
if [[ "${install_boot}" == 'true' ]]; then
|
if [[ -n "$custom_resolution" ]]; then
|
||||||
sudo "$0" -t ${theme} -i ${icon} -s ${screen} -b
|
if [[ "${install_boot}" == 'true' ]]; then
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -c ${custom_resolution} -b
|
||||||
|
else
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -c ${custom_resolution}
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
sudo "$0" -t ${theme} -i ${icon} -s ${screen}
|
if [[ "${install_boot}" == 'true' ]]; then
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -s ${screen} -b
|
||||||
|
else
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -s ${screen}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#Ask for password
|
#Ask for password
|
||||||
@@ -281,16 +296,30 @@ install() {
|
|||||||
else
|
else
|
||||||
sudo -S $0 -t ${theme} -i ${icon} -s ${screen} <<< ${tui_root_login}
|
sudo -S $0 -t ${theme} -i ${icon} -s ${screen} <<< ${tui_root_login}
|
||||||
fi
|
fi
|
||||||
|
elif [[ -n "$custom_resolution" ]]; then
|
||||||
|
if [[ "${install_boot}" == 'true' ]]; then
|
||||||
|
sudo -S $0 -t ${theme} -i ${icon} -c ${custom_resolution} -b <<< ${tui_root_login}
|
||||||
|
else
|
||||||
|
sudo -S $0 -t ${theme} -i ${icon} -c ${custom_resolution} <<< ${tui_root_login}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
prompt -e "\n [ Error! ] -> Run me as root! "
|
prompt -e "\n [ Error! ] -> Run me as root! "
|
||||||
read -r -p " [ Trusted ] Specify the root password : " -t ${MAX_DELAY} -s
|
read -r -p " [ Trusted ] Specify the root password : " -t ${MAX_DELAY} -s
|
||||||
if sudo -S echo <<< $REPLY 2> /dev/null && echo; then
|
if sudo -S echo <<< $REPLY 2> /dev/null && echo; then
|
||||||
#Correct password, use with sudo's stdin
|
#Correct password, use with sudo's stdin
|
||||||
if [[ "${install_boot}" == 'true' ]]; then
|
if [[ -n "$custom_resolution" ]]; then
|
||||||
sudo -S "$0" -t ${theme} -i ${icon} -s ${screen} -b <<< ${REPLY}
|
if [[ "${install_boot}" == 'true' ]]; then
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -c ${custom_resolution} -b <<< ${REPLY}
|
||||||
|
else
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -c ${custom_resolution} <<< ${REPLY}
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
sudo -S "$0" -t ${theme} -i ${icon} -s ${screen} <<< ${REPLY}
|
if [[ "${install_boot}" == 'true' ]]; then
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -s ${screen} -b <<< ${REPLY}
|
||||||
|
else
|
||||||
|
sudo "$0" -t ${theme} -i ${icon} -s ${screen} <<< ${REPLY}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
#block for 3 seconds before allowing another attempt
|
#block for 3 seconds before allowing another attempt
|
||||||
@@ -402,9 +431,9 @@ updating_grub() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f /boot/grub2/grub.cfg && -f /boot/efi/EFI/fedora/grub.cfg ]]; then
|
if [[ -f /boot/grub2/grub.cfg && -f /boot/efi/EFI/fedora/grub.cfg ]]; then
|
||||||
prompt -w "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 -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 "sudo rm -f /boot/efi/EFI/fedora/grub.cfg"
|
prompt -i "\n sudo rm -f /boot/efi/EFI/fedora/grub.cfg"
|
||||||
prompt -i "sudo dnf reinstall grub2-common"
|
prompt -i "sudo dnf reinstall grub2-common"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -415,22 +444,30 @@ updating_grub() {
|
|||||||
|
|
||||||
function install_program () {
|
function install_program () {
|
||||||
if has_command zypper; then
|
if has_command zypper; then
|
||||||
zypper in "$@"
|
zypper in -y "$@"
|
||||||
|
elif has_command swupd; then
|
||||||
|
swupd bundle-add "$@"
|
||||||
elif has_command apt-get; then
|
elif has_command apt-get; then
|
||||||
apt-get install "$@"
|
apt-get install "$@"
|
||||||
elif has_command dnf; then
|
elif has_command dnf; then
|
||||||
dnf install -y "$@"
|
dnf install -y "$@"
|
||||||
elif has_command yum; then
|
elif has_command yum; then
|
||||||
yum install "$@"
|
yum install -y "$@"
|
||||||
elif has_command pacman; then
|
elif has_command pacman; then
|
||||||
pacman -S --noconfirm "$@"
|
pacman -Syyu --noconfirm --needed "$@"
|
||||||
|
elif has_command xbps-install; then
|
||||||
|
xbps-install -Sy "$@"
|
||||||
|
elif has_command eopkg; then
|
||||||
|
eopkg -y install "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_dialog() {
|
install_depends() {
|
||||||
if [ ! "$(which dialog 2> /dev/null)" ]; then
|
local depend=${1}
|
||||||
prompt -w "\n 'dialog' need to be installed for this shell"
|
|
||||||
install_program "dialog"
|
if [ ! "$(which '${depend}' 2> /dev/null)" ]; then
|
||||||
|
prompt -w "\n '${depend}' need to be installed for this shell"
|
||||||
|
install_program "${depend}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +574,7 @@ dialog_installer() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
install_dialog
|
install_depends dialog
|
||||||
fi
|
fi
|
||||||
run_dialog
|
run_dialog
|
||||||
install "${theme}" "${icon}" "${screen}"
|
install "${theme}" "${icon}" "${screen}"
|
||||||
|
|||||||