6 Commits

Author SHA1 Message Date
fa55fb3a81 Add 2k and 4k background image for grub theme 2019-10-01 14:59:14 +08:00
1e8660bcce update 2019-08-30 10:10:24 +08:00
e666d78bf4 Merge branch 'master' of https://github.com/vinceliuice/grub2-themes 2019-08-30 09:55:15 +08:00
fdba42467a update 2019-08-30 09:55:07 +08:00
8da9d44f6e Merge pull request #29 from karmanyaahm/master
Added EndeavourOS icon
2019-08-30 09:28:52 +08:00
90a5dcb2e4 Added EndeavourOS icon 2019-08-28 23:59:13 -04:00
18 changed files with 611 additions and 2237 deletions

View File

@ -21,8 +21,14 @@ Usage: `sudo ./install.sh` **[OPTIONS...]**
| -s, --stylish | Stylish grub theme |
| -t, --tela | Tela grub theme |
| -l, --slaze | Slaze grub theme |
| -2, --2k | Install 2k(2560x1440) background image |
| -4, --4k | Install 4k(3840x2160) background image |
| -h, --help | Show this help |
For example: `Install Tela theme on 2k display device`
sudo ./install -t -2
## Screenshots
### Vimix grub theme

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -24,6 +24,7 @@ solus
kaos
void
macosx
endeavouros
recovery
restart
shutdown

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -23,6 +23,7 @@ lubuntu
solus
kaos
macosx
endeavouros
recovery
restart
shutdown

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

Before

Width:  |  Height:  |  Size: 147 KiB

After

Width:  |  Height:  |  Size: 147 KiB

View File

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 KiB

View File

@ -6,7 +6,7 @@ ROOT_UID=0
THEME_DIR="/boot/grub/themes"
THEME_DIR_2="/boot/grub2/themes"
REO_DIR=$(cd $(dirname $0) && pwd)
REO_DIR="$(cd $(dirname $0) && pwd)"
MAX_DELAY=20 # max delay for user to enter root password
@ -51,6 +51,8 @@ usage() {
printf " %-25s%s\n" "-s, --stylish" "stylish grub theme"
printf " %-25s%s\n" "-t, --tela" "tela grub theme"
printf " %-25s%s\n" "-v, --vimix" "vimix grub theme"
printf " %-25s%s\n" "-2, --2k" "Install 2k(2560x1440) background image"
printf " %-25s%s\n" "-4, --24" "Install 4k(3840x2160) background image"
printf " %-25s%s\n" "-h, --help" "Show this help"
}
@ -64,47 +66,57 @@ install() {
elif [[ ${theme} == 'vimix' ]]; then
local name="Vimix"
else
prompt -i "\n Run sudo ./install.sh again! or run ./install.sh -h for help"
prompt -i "\n Run ./install.sh -h for help or install dialog"
install_dialog
prompt -i "\n Run ./install.sh again!"
exit 0
fi
if [[ ${screen} == '2k' ]]; then
local screen="2k"
elif [[ ${screen} == '4k' ]]; then
local screen="4k"
else
local screen="1080p"
fi
# Checking for root access and proceed if it is present
if [ "$UID" -eq "$ROOT_UID" ]; then
# Create themes directory if not exists
echo -e "\n Checking for the existence of themes directory..."
[[ -d ${THEME_DIR}/${name} ]] && rm -rf ${THEME_DIR}/${name}
[[ -d ${THEME_DIR_2}/${name} ]] && rm -rf ${THEME_DIR_2}/${name}
[[ -d /boot/grub ]] && mkdir -p ${THEME_DIR}/${name}
[[ -d /boot/grub2 ]] && mkdir -p ${THEME_DIR_2}/${name}
[[ -d "${THEME_DIR}/${name}" ]] && rm -rf "${THEME_DIR}/${name}"
[[ -d "${THEME_DIR_2}/${name}" ]] && rm -rf "${THEME_DIR_2}/${name}"
[[ -d /boot/grub ]] && mkdir -p "${THEME_DIR}/${name}"
[[ -d /boot/grub2 ]] && mkdir -p "${THEME_DIR_2}/${name}"
# Copy theme
prompt -i "\n Installing ${name} theme..."
prompt -i "\n Installing ${name} ${screen} theme..."
if [ -d /boot/grub ]; then
cp -a ${REO_DIR}/common/* ${THEME_DIR}/${name}
cp -a ${REO_DIR}/backgrounds/background-${theme}.jpg ${THEME_DIR}/${name}/background.jpg
cp -a "${REO_DIR}/common/"* "${THEME_DIR}/${name}"
cp -a "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${name}/background.jpg"
if [ ${theme} == 'tela' ]; then
cp -a ${REO_DIR}/assets/assets-tela/icons ${THEME_DIR}/${name}
cp -a ${REO_DIR}/assets/assets-tela/select/*.png ${THEME_DIR}/${name}
cp -a "${REO_DIR}/assets/assets-tela/icons" "${THEME_DIR}/${name}"
cp -a "${REO_DIR}/assets/assets-tela/select/"*.png "${THEME_DIR}/${name}"
else
cp -a ${REO_DIR}/assets/assets-white/icons ${THEME_DIR}/${name}
cp -a ${REO_DIR}/assets/assets-white/select/*.png ${THEME_DIR}/${name}
cp -a "${REO_DIR}/assets/assets-white/icons" "${THEME_DIR}/${name}"
cp -a "${REO_DIR}/assets/assets-white/select/"*.png "${THEME_DIR}/${name}"
fi
fi
if [ -d /boot/grub2 ]; then
cp -a ${REO_DIR}/common/* ${THEME_DIR_2}/${name}
cp -a ${REO_DIR}/backgrounds/background-${theme}.jpg ${THEME_DIR_2}/${name}/background.jpg
cp -a "${REO_DIR}/common/"* "${THEME_DIR_2}/${name}"
cp -a "${REO_DIR}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR_2}/${name}/background.jpg"
if [ ${theme} == 'tela' ]; then
cp -a ${REO_DIR}/assets/assets-tela/icons ${THEME_DIR_2}/${name}
cp -a ${REO_DIR}/assets/assets-tela/select/*.png ${THEME_DIR_2}/${name}
cp -a "${REO_DIR}/assets/assets-tela/icons" "${THEME_DIR_2}/${name}"
cp -a "${REO_DIR}/assets/assets-tela/select/"*.png "${THEME_DIR_2}/${name}"
else
cp -a ${REO_DIR}/assets/assets-white/icons ${THEME_DIR_2}/${name}
cp -a ${REO_DIR}/assets/assets-white/select/*.png ${THEME_DIR_2}/${name}
cp -a "${REO_DIR}/assets/assets-white/icons" "${THEME_DIR_2}/${name}"
cp -a "${REO_DIR}/assets/assets-white/select/*".png "${THEME_DIR_2}/${name}"
fi
fi
@ -112,6 +124,10 @@ install() {
prompt -i "\n Setting ${name} as default..."
grep "GRUB_THEME=" /etc/default/grub 2>&1 >/dev/null && sed -i '/GRUB_THEME=/d' /etc/default/grub
# Backup grub config
cp -an /etc/default/grub /etc/default/grub.bak
# Edit grub config
[[ -d /boot/grub ]] && echo "GRUB_THEME=\"${THEME_DIR}/${name}/theme.txt\"" >> /etc/default/grub
[[ -d /boot/grub2 ]] && echo "GRUB_THEME=\"${THEME_DIR_2}/${name}/theme.txt\"" >> /etc/default/grub
@ -131,7 +147,7 @@ install() {
else
# Error message
prompt -e "\n [ Error!] -> Run me as root "
prompt -e "\n [ Error! ] -> Run me as root "
# persisted execution of the script as root
read -p "[ trusted ] specify the root password : " -t${MAX_DELAY} -s
@ -193,7 +209,7 @@ fi
if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]]; then
# Error message
prompt -e "\n [ Error!] -> Run me as root "
prompt -e "\n [ Error! ] -> Run me as root "
# persisted execution of the script as root
read -p "[ trusted ] specify the root password : " -t${MAX_DELAY} -s
@ -219,6 +235,12 @@ while [[ $# -ge 1 ]]; do
-v|--vimix)
theme='vimix'
;;
-2|--2k)
screen='2k'
;;
-4|--4k)
screen='4k'
;;
-h|--help)
usage
exit 0
@ -232,6 +254,6 @@ while [[ $# -ge 1 ]]; do
shift
done
install_dialog && install
install
exit 0