mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-12-25 18:45:35 +01:00
commit
50cc1ef794
10
install.sh
10
install.sh
@ -112,10 +112,20 @@ install() {
|
|||||||
cp -an /etc/default/grub /etc/default/grub.bak
|
cp -an /etc/default/grub /etc/default/grub.bak
|
||||||
|
|
||||||
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
|
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
|
||||||
|
grep "GRUB_GFXMODE=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_GFXMODE=/d' /etc/default/grub
|
||||||
|
|
||||||
# Edit grub config
|
# Edit grub config
|
||||||
echo "GRUB_THEME=\"${THEME_DIR}/${name}/theme.txt\"" >> /etc/default/grub
|
echo "GRUB_THEME=\"${THEME_DIR}/${name}/theme.txt\"" >> /etc/default/grub
|
||||||
|
|
||||||
|
# Make sure set the right resolution for grub
|
||||||
|
if [[ ${screen} == '4k' ]]; then
|
||||||
|
echo "GRUB_GFXMODE=3840x2160x32" >> /etc/default/grub
|
||||||
|
echo "GRUB_GFXPAYLOAD_LINUX=text" >> /etc/default/grub
|
||||||
|
elif [[ ${screen} == '2k' ]]; then
|
||||||
|
echo "GRUB_GFXMODE=2560×1440x32" >> /etc/default/grub
|
||||||
|
echo "GRUB_GFXPAYLOAD_LINUX=text" >> /etc/default/grub
|
||||||
|
fi
|
||||||
|
|
||||||
# Update grub config
|
# Update grub config
|
||||||
prompt -i "\n Updating grub config..."
|
prompt -i "\n Updating grub config..."
|
||||||
if has_command update-grub; then
|
if has_command update-grub; then
|
||||||
|
Loading…
Reference in New Issue
Block a user