Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,24 @@ echo | sudo tee -a /etc/default/grub
echo 'Adding theme to GRUB config'
echo "GRUB_THEME=/boot/${GRUB_DIR}/themes/${THEME}/theme.txt" | sudo tee -a /etc/default/grub

# Detect primary display resolution
which xrandr 2>&1 >/dev/null

if [ $? == 0 ];
then
# Detect old primary display resolution item
OLD_RES=`cat /etc/default/grub | grep "GRUB_GFXMODE="`

if [ $OLD_RES != "" ];
then
echo 'Delete old GRUB resolution entries'
sed -i "/^$OLD_RES/d" /etc/default/grub
fi

RES=`xrandr | grep "connected primary" | awk '{print $4}' | sed 's#+.+.$##g'`
echo "GRUB_GFXMODE=$RES" | sudo tee -a /etc/default/grub
fi

echo 'Removing theme installation files'
rm -rf ${THEME}.zip ${THEME}-master

Expand Down