mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 14:56:14 +01:00
fix: the old background reappears for a few seconds
Add replacing or appending "GRUB_BACKGROUND" surpport for file "/etc/default/grub" to fix "the old background reappears for a few seconds" bug.
This commit is contained in:
parent
9c673d5a34
commit
cd5fee4582
@ -181,6 +181,14 @@ install() {
|
||||
echo "GRUB_THEME=\"${THEME_DIR}/${theme}/theme.txt\"" >> /etc/default/grub
|
||||
fi
|
||||
|
||||
if grep "GRUB_BACKGROUND=" /etc/default/grub 2>&1 >/dev/null; then
|
||||
#Replace GRUB_BACKGROUND
|
||||
sed -i "s|.*GRUB_BACKGROUND=.*|GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"|" /etc/default/grub
|
||||
else
|
||||
#Append GRUB_BACKGROUND
|
||||
echo "GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"" >> /etc/default/grub
|
||||
fi
|
||||
|
||||
# Make sure the right resolution for grub is set
|
||||
if [[ ${screen} == '1080p' ]]; then
|
||||
gfxmode="GRUB_GFXMODE=1920x1080,auto"
|
||||
|
Loading…
Reference in New Issue
Block a user