6 Commits

Author SHA1 Message Date
vinceliuice 80dd04ddf3 Fixed #249 2025-09-06 13:23:39 +08:00
vinceliuice 8f30385f55 Update README.md 2025-08-28 19:52:00 +08:00
vinceliuice 6f235a8bc5 Update install.sh 2025-08-17 12:20:45 +08:00
vinceliuice 03d8c9cf0d Fixed #247 2025-08-13 16:01:31 +08:00
Vince 6c26f99622 Merge pull request #242 from aryankaran/patch-1
Fix background in terminal
2025-07-23 22:12:38 +08:00
Aryan Karan 7cf2f0918f Fix background in terminal
Becoz of GRUB_BACKGROUND being set it shows backkground in grub terminal too which is highly discouraged as it reduces visibilty of texts to 10-30%  

so better keep the terminal and other screen black expect the grub menu which is already set by theme  ```desktop-image```
2025-04-03 18:35:00 +05:30
2 changed files with 23 additions and 12 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ After that, you can configure the theme as shown below. In this example it is in
- Finally, run `grub-mkconfig -o /boot/grub/grub.cfg` to update your grub config
### Setting a custom background:
- 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` or `magick`
- Find the resolution of your display, and make sure your background matches the resolution
- 1920x1080 >> 1080p
- 2560x1080 >> ultrawide
+22 -11
View File
@@ -116,7 +116,11 @@ generate() {
# Determine which configuration file and assets to use
if [[ -n "$custom_resolution" ]]; then
install_depends ImageMagick
if has_command apt || has_command pacman || has_command eopkg; then
install_depends imagemagick
else
install_depends ImageMagick
fi
asset_type=$(get_asset_type "$custom_resolution")
cp -a --no-preserve=ownership "${REO_DIR}/config/theme-${asset_type}.txt" "${THEME_DIR}/${theme}/theme.txt"
# Replace resolution in theme.txt
@@ -131,10 +135,14 @@ generate() {
# Use custom background.jpg as grub background image
if [[ -f "${REO_DIR}/background.jpg" ]]; then
install_depends ImageMagick
if has_command apt || has_command pacman || has_command eopkg; then
install_depends imagemagick
else
install_depends ImageMagick
fi
prompt -w "\n Using custom background.jpg as grub background image..."
cp -a --no-preserve=ownership "${REO_DIR}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
magick -auto-orient "${THEME_DIR}/${theme}/background.jpg" "${THEME_DIR}/${theme}/background.jpg"
magick "${THEME_DIR}/${theme}/background.jpg" -auto-orient "${THEME_DIR}/${theme}/background.jpg"
fi
# Determine which assets to use based on custom resolution or screen
@@ -215,11 +223,8 @@ install() {
fi
if grep "GRUB_BACKGROUND=" /etc/default/grub 2>&1 >/dev/null; then
#Replace GRUB_BACKGROUND
sed -i "s|.*GRUB_BACKGROUND=.*|GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"|" /etc/default/grub
else
#Append GRUB_BACKGROUND
echo "GRUB_BACKGROUND=\"${THEME_DIR}/${theme}/background.jpg\"" >> /etc/default/grub
# remove GRUB_BACKGROUND
sed -i "s|.*GRUB_BACKGROUND=.*||" /etc/default/grub
fi
# Make sure the right resolution for grub is set
@@ -439,15 +444,21 @@ updating_grub() {
function install_program () {
if has_command zypper; then
zypper in "$@"
zypper in -y "$@"
elif has_command swupd; then
swupd bundle-add "$@"
elif has_command apt-get; then
apt-get install "$@"
elif has_command dnf; then
dnf install -y "$@"
elif has_command yum; then
yum install "$@"
yum install -y "$@"
elif has_command pacman; then
pacman -S --noconfirm "$@"
pacman -Syyu --noconfirm --needed "$@"
elif has_command xbps-install; then
xbps-install -Sy "$@"
elif has_command eopkg; then
eopkg -y install "$@"
fi
}