Skip to content

Commit

Permalink
Add 2k and 4k background image for grub theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceliuice committed Oct 1, 2019
1 parent 1e8660b commit fa55fb3
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added backgrounds/2k/background-stylish.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/2k/background-tela.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/2k/background-vimix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/4k/background-stylish.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/4k/background-tela.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/4k/background-vimix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 23 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -64,10 +66,20 @@ 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

Expand All @@ -80,11 +92,11 @@ install() {
[[ -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}/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}"
Expand All @@ -97,7 +109,7 @@ install() {

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}/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}"
Expand Down Expand Up @@ -223,6 +235,12 @@ while [[ $# -ge 1 ]]; do
-v|--vimix)
theme='vimix'
;;
-2|--2k)
screen='2k'
;;
-4|--4k)
screen='4k'
;;
-h|--help)
usage
exit 0
Expand All @@ -236,6 +254,6 @@ while [[ $# -ge 1 ]]; do
shift
done

install_dialog && install
install

exit 0

0 comments on commit fa55fb3

Please sign in to comment.