mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2026-06-08 13:03:17 +08:00
Update
This commit is contained in:
+24
-8
@@ -50,6 +50,7 @@ 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" "-w, --white" "Install white icon version"
|
||||
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" "-r, --remove" "Remove theme (must add theme name option)"
|
||||
@@ -80,6 +81,12 @@ install() {
|
||||
local screen="1080p"
|
||||
fi
|
||||
|
||||
if [[ ${icon} == 'white' ]]; then
|
||||
local icon="white"
|
||||
else
|
||||
local icon="color"
|
||||
fi
|
||||
|
||||
# Checking for root access and proceed if it is present
|
||||
if [ "$UID" -eq "$ROOT_UID" ]; then
|
||||
|
||||
@@ -96,14 +103,8 @@ install() {
|
||||
cp -a "${REO_DIR}/common/"*.pf2 "${THEME_DIR}/${name}"
|
||||
cp -a "${REO_DIR}/common/theme-${screen}.txt" "${THEME_DIR}/${name}/theme.txt"
|
||||
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-${screen}" "${THEME_DIR}/${name}/icons"
|
||||
cp -a "${REO_DIR}/assets/assets-tela/select-${screen}/"*.png "${THEME_DIR}/${name}"
|
||||
else
|
||||
cp -a "${REO_DIR}/assets/assets-white/icons-${screen}" "${THEME_DIR}/${name}/icons"
|
||||
cp -a "${REO_DIR}/assets/assets-white/select-${screen}/"*.png "${THEME_DIR}/${name}"
|
||||
fi
|
||||
cp -a "${REO_DIR}/assets/assets-${icon}/icons-${screen}" "${THEME_DIR}/${name}/icons"
|
||||
cp -a "${REO_DIR}/assets/assets-${icon}/select-${screen}/"*.png "${THEME_DIR}/${name}"
|
||||
|
||||
# Set theme
|
||||
prompt -i "\n Setting ${name} as default..."
|
||||
@@ -177,6 +178,15 @@ run_dialog() {
|
||||
*) prompt "Canceled" ;;
|
||||
esac
|
||||
tui=$(dialog --backtitle "GRUB2 THEMES" \
|
||||
--radiolist "Choose icon style : " 15 40 5 \
|
||||
1 "white" off \
|
||||
2 "color" on --output-fd 1 )
|
||||
case "$tui" in
|
||||
1) icon="white" ;;
|
||||
2) icon="color" ;;
|
||||
*) prompt "Canceled" ;;
|
||||
esac
|
||||
tui=$(dialog --backtitle "GRUB2 THEMES" \
|
||||
--radiolist "Choose your Display Resolution : " 15 40 5 \
|
||||
1 "1080p" on \
|
||||
2 "2k" off \
|
||||
@@ -303,6 +313,12 @@ while [[ $# -ge 1 ]]; do
|
||||
-v|--vimix)
|
||||
theme='vimix'
|
||||
;;
|
||||
-w|--white)
|
||||
icon='white'
|
||||
;;
|
||||
-c|--color)
|
||||
icon='color'
|
||||
;;
|
||||
-1|--1080p)
|
||||
screen='1080p'
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user