Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7036d56 authored by Nishith  Khanna's avatar Nishith Khanna
Browse files

Merge branch '2952-a15-theme' into 'a15'

Add our wallpapers

See merge request !12
parents 20d813b1 d51ccff7
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -12,4 +12,24 @@ android_app {

    sdk_version: "current",
    product_specific: true,
    aaptflags: ["--auto-add-overlay"],
    resource_dirs: [
        "res",
        "res_phone",
    ],
}

android_app {
    name: "BackgroundsTablet",

    sdk_version: "current",
    product_specific: true,
    aaptflags: ["--auto-add-overlay"],
    resource_dirs: [
        "res",
        "res_tablet",
    ],
    overrides: [
        "Backgrounds"
    ],
}

convert2webp.sh

0 → 100755
+57 −0
Original line number Diff line number Diff line
#!/bin/bash

# Check if required commands are installed
for cmd in parallel cwebp; do
    if ! command -v "$cmd" &> /dev/null; then
        echo "$cmd is not installed. Please install it with:"
        case "$cmd" in
            parallel)
                echo "  sudo apt install parallel      # Debian/Ubuntu"
                echo "  sudo pacman -S parallel        # Arch"
                echo "  brew install parallel          # macOS"
                ;;
            cwebp)
                echo "  sudo apt install webp          # Debian/Ubuntu"
                echo "  sudo pacman -S libwebp         # Arch"
                echo "  brew install webp              # macOS"
                ;;
        esac
        exit 1
    fi
done

TARGET_DIRS=(
    "./res/drawable-nodpi"
    "./res_phone/drawable-nodpi"
    "./res_tablet/drawable-nodpi"
)

SUPPORTED_EXTENSIONS="png jpg jpeg"

for TARGET_DIR in "${TARGET_DIRS[@]}"; do
    if [ ! -d "$TARGET_DIR" ]; then
        echo "Directory $TARGET_DIR does not exist. Skipping..."
        continue
    fi

    FILES=()
    for ext in $SUPPORTED_EXTENSIONS; do
        while IFS= read -r -d '' file; do
            FILES+=("$file")
        done < <(find "$TARGET_DIR" -maxdepth 1 -type f -iname "*.$ext" -print0)
    done

    if [ ${#FILES[@]} -eq 0 ]; then
        echo "No supported image files found in $TARGET_DIR."
        continue
    fi

    echo "Converting images in $TARGET_DIR to lossless WEBP format..."
    printf "%s\0" "${FILES[@]}" | parallel -0 -eta 'cwebp -q 100 {} -o {.}.webp && rm "{}"'

    if [ $? -eq 0 ]; then
        echo "Conversion completed in $TARGET_DIR. Non-WEBP files deleted."
    else
        echo "An error occurred during conversion in $TARGET_DIR."
    fi
done
−288 KiB
Loading image diff...
−15.8 KiB
Loading image diff...
−204 KiB
Loading image diff...
Loading