-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a9b1e3
commit 750b2f7
Showing
16 changed files
with
338 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#! /bin/bash | ||
|
||
# KDE wallpaper generator | ||
wp_source="wallpapers/" # example $wp_source/$wp_type_$wp_color.svg | ||
wp_path="src/radxa-theme/wallpapers" | ||
wp_types=("wavy" "blocky" "mountain") | ||
wp_colors=("pink" "blue" "light/dark") | ||
|
||
for wp_type in "${wp_types[@]}"; do | ||
for wp_color in "${wp_colors[@]}"; do | ||
wp_type_ucfirst="$(tr '[:lower:]' '[:upper:]' <<< ${wp_type:0:1})${wp_type:1}" | ||
if [ "$wp_color" == "light/dark" ]; then | ||
wp_file_dark="$wp_path/$wp_type/contents/images_dark/3840x2160.svg" | ||
wp_file_light="$wp_path/$wp_type/contents/images/3840x2160.svg" | ||
wp_source_file_dark="$wp_source/${wp_type}-dark.svg" | ||
light_source_file="$wp_source/${wp_type}-green.svg" | ||
echo "Generating $wp_type light/dark" | ||
mkdir -pv $wp_path/$wp_type/contents/images_dark | ||
mkdir -pv $wp_path/$wp_type/contents/images | ||
cp -v $wp_source_file_dark $wp_file_dark | ||
cp -v $light_source_file $wp_file_light | ||
echo "Generating metadata.json for $wp_type Light/Dark" | ||
cat <<EOF > $wp_path/$wp_type/metadata.json | ||
{ | ||
"KPlugin": { | ||
"Name": "$wp_type_ucfirst Light/Dark", | ||
"Id": "$wp_type", | ||
"License": "cc-by-nc", | ||
"Authors": [ | ||
{ | ||
"Name": "Radxa", | ||
"Email": "dev@radxa.com" | ||
} | ||
] | ||
}, | ||
"X-KDE-PlasmaImageWallpaper-AccentColor": { | ||
"Dark": "#018786", | ||
"Light": "#3d818d" | ||
} | ||
} | ||
EOF | ||
else | ||
wp_file="$wp_path/$wp_type-$wp_color/contents/images/3840x2160.svg" | ||
wp_source_file="$wp_source/${wp_type}-${wp_color}.svg" | ||
echo "Generating $wp_type $wp_color" | ||
mkdir -pv $wp_path/$wp_type-$wp_color/contents/images | ||
cp -v $wp_source_file $wp_file | ||
echo "Generating metadata.json for $wp_type_ucfirst $wp_color" | ||
cat <<EOF > $wp_path/$wp_type-$wp_color/metadata.json | ||
{ | ||
"KPlugin": { | ||
"Name": "$wp_type_ucfirst $wp_color", | ||
"Id": "$wp_type-$wp_color", | ||
"License": "cc-by-nc", | ||
"Authors": [ | ||
{ | ||
"Name": "Radxa", | ||
"Email": "dev@radxa.com" | ||
} | ||
] | ||
} | ||
} | ||
EOF | ||
fi | ||
done | ||
done |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.