mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 14:26:13 +01:00
Merge pull request #109 from rvolden/master
Ultrawide 2k (3440x1440) support
This commit is contained in:
commit
3a6af1d987
@ -22,6 +22,7 @@ Usage: `sudo ./install.sh [OPTIONS...]`
|
|||||||
| -l, --slaze | Install Slaze grub theme |
|
| -l, --slaze | Install Slaze grub theme |
|
||||||
| -w, --white | Install using black and white icons |
|
| -w, --white | Install using black and white icons |
|
||||||
| -u, --ultrawide | Install 21:9 (2560x1080) background image - not available for slaze theme|
|
| -u, --ultrawide | Install 21:9 (2560x1080) background image - not available for slaze theme|
|
||||||
|
| -U, --ultrawide2k | Install 21:9 (3440x1440) background image - not available for slaze theme|
|
||||||
| -C, --custom-background| Use either background.jpg or custom-background.jpg as theme background instead
|
| -C, --custom-background| Use either background.jpg or custom-background.jpg as theme background instead
|
||||||
| -2, --2k | Install 2k (2560x1440) background image |
|
| -2, --2k | Install 2k (2560x1440) background image |
|
||||||
| -4, --4k | Install 4k (3840x2160) background image |
|
| -4, --4k | Install 4k (3840x2160) background image |
|
||||||
@ -53,7 +54,7 @@ _If no options are used, a user interface will show up instead_
|
|||||||
|
|
||||||
- Make sure you have `imagemagick` installed, or at least something that provides `convert`
|
- Make sure you have `imagemagick` installed, or at least something that provides `convert`
|
||||||
- Find the resolution of your display, and make sure your background matches the resolution
|
- Find the resolution of your display, and make sure your background matches the resolution
|
||||||
- (1920x1080 -> --1080p, 2560x1080 -> --ultrawide, 2560x1440 -> --2k, 3840x2160 -> --4k)
|
- (1920x1080 -> --1080p, 2560x1080 -> --ultrawide, 2560x1440 -> --2k, 3440x1440 -> --ultrawide2k, 3840x2160 -> --4k)
|
||||||
- Place your custom background inside the root of the project, and name it either background.jpg or custom-background.jpg
|
- Place your custom background inside the root of the project, and name it either background.jpg or custom-background.jpg
|
||||||
- Run the installer like normal, but with `--custom-background`, `--[YOUR_RESOLUTION]` and `--[THEME]`
|
- Run the installer like normal, but with `--custom-background`, `--[YOUR_RESOLUTION]` and `--[THEME]`
|
||||||
- Make sure to replace `[YOUR_RESOLUTION]` with your resolution and `[THEME]` with the theme
|
- Make sure to replace `[YOUR_RESOLUTION]` with your resolution and `[THEME]` with the theme
|
||||||
|
BIN
backgrounds/1440p_21:9/background-stylish.jpg
Normal file
BIN
backgrounds/1440p_21:9/background-stylish.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 KiB |
BIN
backgrounds/1440p_21:9/background-tela.jpg
Normal file
BIN
backgrounds/1440p_21:9/background-tela.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
backgrounds/1440p_21:9/background-vimix.jpg
Normal file
BIN
backgrounds/1440p_21:9/background-vimix.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 276 KiB |
44
config/theme-1440p_21:9.txt
Normal file
44
config/theme-1440p_21:9.txt
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# GRUB2 gfxmenu Linux theme
|
||||||
|
# Designed for any resolution
|
||||||
|
|
||||||
|
# Global Property
|
||||||
|
title-text: ""
|
||||||
|
desktop-image: "background.jpg"
|
||||||
|
desktop-color: "#000000"
|
||||||
|
terminal-font: "Terminus Regular 18"
|
||||||
|
terminal-box: "terminal_box_*.png"
|
||||||
|
terminal-left: "0"
|
||||||
|
terminal-top: "0"
|
||||||
|
terminal-width: "100%"
|
||||||
|
terminal-height: "100%"
|
||||||
|
terminal-border: "0"
|
||||||
|
|
||||||
|
# Show the boot menu
|
||||||
|
+ boot_menu {
|
||||||
|
left = 30%
|
||||||
|
top = 30%
|
||||||
|
width = 45%
|
||||||
|
height = 60%
|
||||||
|
item_font = "DejaVu Sans Regular 24"
|
||||||
|
item_color = "#cccccc"
|
||||||
|
selected_item_color = "#ffffff"
|
||||||
|
icon_width = 48
|
||||||
|
icon_height = 48
|
||||||
|
item_icon_space = 24
|
||||||
|
item_height = 56
|
||||||
|
item_padding = 8
|
||||||
|
item_spacing = 16
|
||||||
|
selected_item_pixmap_style = "select_*.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Show a countdown message using the label component
|
||||||
|
+ label {
|
||||||
|
top = 82%
|
||||||
|
left = 32%
|
||||||
|
width = 30%
|
||||||
|
align = "center"
|
||||||
|
id = "__timeout__"
|
||||||
|
text = "Booting in %d seconds"
|
||||||
|
color = "#cccccc"
|
||||||
|
font = "DejaVu Sans Regular 24"
|
||||||
|
}
|
18
install.sh
18
install.sh
@ -58,6 +58,7 @@ usage() {
|
|||||||
printf " %-25s%s\n" "-v, --vimix" "vimix 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" "-w, --white" "Install white icon version"
|
||||||
printf " %-25s%s\n" "-u, --ultrawide" "Install 2560x1080 background image - not available for slaze grub theme"
|
printf " %-25s%s\n" "-u, --ultrawide" "Install 2560x1080 background image - not available for slaze grub theme"
|
||||||
|
printf " %-25s%s\n" "-U, --ultrawide2k" "Install 3440x1440 background image"
|
||||||
printf " %-25s%s\n" "-C, --custom-background" "Use either background.jpg or custom-background.jpg as theme background instead"
|
printf " %-25s%s\n" "-C, --custom-background" "Use either background.jpg or custom-background.jpg as theme background instead"
|
||||||
printf " %-25s%s\n" "-2, --2k" "Install 2k(2560x1440) background image"
|
printf " %-25s%s\n" "-2, --2k" "Install 2k(2560x1440) background image"
|
||||||
printf " %-25s%s\n" "-4, --4k" "Install 4k(3840x2160) background image"
|
printf " %-25s%s\n" "-4, --4k" "Install 4k(3840x2160) background image"
|
||||||
@ -87,6 +88,8 @@ install() {
|
|||||||
local screen="4k"
|
local screen="4k"
|
||||||
elif [[ ${screen} == '1080p_21:9' ]]; then
|
elif [[ ${screen} == '1080p_21:9' ]]; then
|
||||||
local screen="1080p_21:9"
|
local screen="1080p_21:9"
|
||||||
|
elif [[ ${screen} == '1440p_21:9' ]]; then
|
||||||
|
local screen="1440p_21:9"
|
||||||
else
|
else
|
||||||
local screen="1080p"
|
local screen="1080p"
|
||||||
fi
|
fi
|
||||||
@ -94,6 +97,9 @@ install() {
|
|||||||
if [[ ${screen} == '1080p_21:9' && ${name} == 'Slaze' ]]; then
|
if [[ ${screen} == '1080p_21:9' && ${name} == 'Slaze' ]]; then
|
||||||
prompt -e "ultrawide 1080p does not support Slaze theme"
|
prompt -e "ultrawide 1080p does not support Slaze theme"
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [[ ${screen} == '1440p_21:9' && ${name} == 'Slaze' ]]; then
|
||||||
|
prompt -e "ultrawide 1440p does not support Slaze theme"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${custom_background} == 'custom-background' ]]; then
|
if [[ ${custom_background} == 'custom-background' ]]; then
|
||||||
@ -152,6 +158,9 @@ install() {
|
|||||||
if [[ ${screen} == '1080p_21:9' ]]; then
|
if [[ ${screen} == '1080p_21:9' ]]; then
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-1080p" "${THEME_DIR}/${name}/icons"
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-1080p" "${THEME_DIR}/${name}/icons"
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/select-1080p/"*.png "${THEME_DIR}/${name}"
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/select-1080p/"*.png "${THEME_DIR}/${name}"
|
||||||
|
elif [[ ${screen} == '1440p_21:9' ]]; then
|
||||||
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-2k" "${THEME_DIR}/${name}/icons"
|
||||||
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/select-2k/"*.png "${THEME_DIR}/${name}"
|
||||||
else
|
else
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-${screen}" "${THEME_DIR}/${name}/icons"
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/icons-${screen}" "${THEME_DIR}/${name}/icons"
|
||||||
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/select-${screen}/"*.png "${THEME_DIR}/${name}"
|
cp -a --no-preserve=ownership "${REO_DIR}/assets/assets-${icon}/select-${screen}/"*.png "${THEME_DIR}/${name}"
|
||||||
@ -180,6 +189,8 @@ install() {
|
|||||||
gfxmode="GRUB_GFXMODE=3840x2160,auto"
|
gfxmode="GRUB_GFXMODE=3840x2160,auto"
|
||||||
elif [[ ${screen} == '2k' ]]; then
|
elif [[ ${screen} == '2k' ]]; then
|
||||||
gfxmode="GRUB_GFXMODE=2560x1440,auto"
|
gfxmode="GRUB_GFXMODE=2560x1440,auto"
|
||||||
|
elif [[ ${screen} == '1440p_21:9' ]]; then
|
||||||
|
gfxmode="GRUB_GFXMODE=3440x1440,auto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep "GRUB_GFXMODE=" /etc/default/grub 2>&1 >/dev/null; then
|
if grep "GRUB_GFXMODE=" /etc/default/grub 2>&1 >/dev/null; then
|
||||||
@ -301,12 +312,14 @@ run_dialog() {
|
|||||||
1 "1080p (1920x1080)" on \
|
1 "1080p (1920x1080)" on \
|
||||||
2 "1080p ultrawide (2560x1080)" off \
|
2 "1080p ultrawide (2560x1080)" off \
|
||||||
3 "2k (2560x1440)" off \
|
3 "2k (2560x1440)" off \
|
||||||
4 "4k (3840x2160)" off --output-fd 1 )
|
4 "4k (3840x2160)" off \
|
||||||
|
5 "1440p ultrawide (3440x1440)" off --output-fd 1 )
|
||||||
case "$tui" in
|
case "$tui" in
|
||||||
1) screen="1080p" ;;
|
1) screen="1080p" ;;
|
||||||
2) screen="1080p_21:9" ;;
|
2) screen="1080p_21:9" ;;
|
||||||
3) screen="2k" ;;
|
3) screen="2k" ;;
|
||||||
4) screen="4k" ;;
|
4) screen="4k" ;;
|
||||||
|
5) screen="1440p_21:9";;
|
||||||
*) operation_canceled ;;
|
*) operation_canceled ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
@ -481,6 +494,9 @@ while [[ $# -ge 1 ]]; do
|
|||||||
-u|--ultrawide|--1080p_21:9)
|
-u|--ultrawide|--1080p_21:9)
|
||||||
screen='1080p_21:9'
|
screen='1080p_21:9'
|
||||||
;;
|
;;
|
||||||
|
-U|--ultrawide2k|--1440p_21:9)
|
||||||
|
screen='1440p_21:9'
|
||||||
|
;;
|
||||||
-C|--custom-background|--custom)
|
-C|--custom-background|--custom)
|
||||||
custom_background='custom-background'
|
custom_background='custom-background'
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user