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

No files matched your search

+6
View File
@@ -21,8 +21,14 @@ Usage: `sudo ./install.sh` **[OPTIONS...]**
| -s, --stylish | Stylish grub theme | | -s, --stylish | Stylish grub theme |
| -t, --tela | Tela grub theme | | -t, --tela | Tela grub theme |
| -l, --slaze | Slaze 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 | | -h, --help | Show this help |
For example: `Install Tela theme on 2k display device`
sudo ./install -t -2
## Screenshots ## Screenshots
### Vimix grub theme ### Vimix grub theme
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+275 -1096
View File
File diff suppressed because it is too large. Load diff

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 61 KiB

+1
View File
@@ -24,6 +24,7 @@ solus
kaos kaos
void void
macosx macosx
endeavouros
recovery recovery
restart restart
shutdown 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

+1
View File
@@ -23,6 +23,7 @@ lubuntu
solus solus
kaos kaos
macosx macosx
endeavouros
recovery recovery
restart restart
shutdown shutdown
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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

+42 -20
View File
@@ -6,7 +6,7 @@ ROOT_UID=0
THEME_DIR="/boot/grub/themes" THEME_DIR="/boot/grub/themes"
THEME_DIR_2="/boot/grub2/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 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" "-s, --stylish" "stylish grub theme"
printf " %-25s%s\n" "-t, --tela" "tela grub theme" printf " %-25s%s\n" "-t, --tela" "tela grub theme"
printf " %-25s%s\n" "-v, --vimix" "vimix 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" printf " %-25s%s\n" "-h, --help" "Show this help"
} }
@@ -64,47 +66,57 @@ install() {
elif [[ ${theme} == 'vimix' ]]; then elif [[ ${theme} == 'vimix' ]]; then
local name="Vimix" local name="Vimix"
else 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 exit 0
fi 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 # Checking for root access and proceed if it is present
if [ "$UID" -eq "$ROOT_UID" ]; then if [ "$UID" -eq "$ROOT_UID" ]; then
# Create themes directory if not exists # Create themes directory if not exists
echo -e "\n Checking for the existence of themes directory..." echo -e "\n Checking for the existence of themes directory..."
[[ -d ${THEME_DIR}/${name} ]] && rm -rf ${THEME_DIR}/${name} [[ -d "${THEME_DIR}/${name}" ]] && rm -rf "${THEME_DIR}/${name}"
[[ -d ${THEME_DIR_2}/${name} ]] && rm -rf ${THEME_DIR_2}/${name} [[ -d "${THEME_DIR_2}/${name}" ]] && rm -rf "${THEME_DIR_2}/${name}"
[[ -d /boot/grub ]] && mkdir -p ${THEME_DIR}/${name} [[ -d /boot/grub ]] && mkdir -p "${THEME_DIR}/${name}"
[[ -d /boot/grub2 ]] && mkdir -p ${THEME_DIR_2}/${name} [[ -d /boot/grub2 ]] && mkdir -p "${THEME_DIR_2}/${name}"
# Copy theme # Copy theme
prompt -i "\n Installing ${name} theme..." prompt -i "\n Installing ${name} ${screen} theme..."
if [ -d /boot/grub ]; then if [ -d /boot/grub ]; then
cp -a ${REO_DIR}/common/* ${THEME_DIR}/${name} 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}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR}/${name}/background.jpg"
if [ ${theme} == 'tela' ]; then if [ ${theme} == 'tela' ]; then
cp -a ${REO_DIR}/assets/assets-tela/icons ${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} cp -a "${REO_DIR}/assets/assets-tela/select/"*.png "${THEME_DIR}/${name}"
else else
cp -a ${REO_DIR}/assets/assets-white/icons ${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} cp -a "${REO_DIR}/assets/assets-white/select/"*.png "${THEME_DIR}/${name}"
fi fi
fi fi
if [ -d /boot/grub2 ]; then if [ -d /boot/grub2 ]; then
cp -a ${REO_DIR}/common/* ${THEME_DIR_2}/${name} 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}/backgrounds/${screen}/background-${theme}.jpg" "${THEME_DIR_2}/${name}/background.jpg"
if [ ${theme} == 'tela' ]; then if [ ${theme} == 'tela' ]; then
cp -a ${REO_DIR}/assets/assets-tela/icons ${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} cp -a "${REO_DIR}/assets/assets-tela/select/"*.png "${THEME_DIR_2}/${name}"
else else
cp -a ${REO_DIR}/assets/assets-white/icons ${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} cp -a "${REO_DIR}/assets/assets-white/select/*".png "${THEME_DIR_2}/${name}"
fi fi
fi fi
@@ -112,6 +124,10 @@ install() {
prompt -i "\n Setting ${name} as default..." 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 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/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 [[ -d /boot/grub2 ]] && echo "GRUB_THEME=\"${THEME_DIR_2}/${name}/theme.txt\"" >> /etc/default/grub
@@ -219,6 +235,12 @@ while [[ $# -ge 1 ]]; do
-v|--vimix) -v|--vimix)
theme='vimix' theme='vimix'
;; ;;
-2|--2k)
screen='2k'
;;
-4|--4k)
screen='4k'
;;
-h|--help) -h|--help)
usage usage
exit 0 exit 0
@@ -232,6 +254,6 @@ while [[ $# -ge 1 ]]; do
shift shift
done done
install_dialog && install install
exit 0 exit 0