Merge pull request #200 from hotime/patch-1
fix: the old background reappears for a few seconds
This commit is contained in:
commit
02ec0a888b
1 changed files with 8 additions and 0 deletions
|
@ -181,6 +181,14 @@ install() {
|
||||||
echo "GRUB_THEME=\"${THEME_DIR}/${theme}/theme.txt\"" >> /etc/default/grub
|
echo "GRUB_THEME=\"${THEME_DIR}/${theme}/theme.txt\"" >> /etc/default/grub
|
||||||
fi
|
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
|
# Make sure the right resolution for grub is set
|
||||||
if [[ ${screen} == '1080p' ]]; then
|
if [[ ${screen} == '1080p' ]]; then
|
||||||
gfxmode="GRUB_GFXMODE=1920x1080,auto"
|
gfxmode="GRUB_GFXMODE=1920x1080,auto"
|
||||||
|
|
Loading…
Reference in a new issue