Skip to content

Commit

Permalink
add wallpapers
Browse files Browse the repository at this point in the history
  • Loading branch information
RadxaPanda committed Jun 6, 2024
1 parent 3a9b1e3 commit 750b2f7
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ MANDIR ?= $(PREFIX)/share/man
ETCDIR ?= /etc

.PHONY: all
all: build
all: build deb

.PHONY: build
build:

./gen-wallpapers.sh
#
# Test
#
Expand All @@ -29,7 +29,7 @@ clean: clean-deb

.PHONY: clean-deb
clean-deb:
rm -rf debian/.debhelper debian/radxa-desktop-branding/ debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.postrm.debhelper debian/*.substvars
rm -rf debian/.debhelper debian/radxa-desktop-branding/ debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.postrm.debhelper debian/*.substvars src/radxa-theme/wallpapers/

#
# Release
Expand All @@ -39,7 +39,7 @@ dch: debian/changelog
EDITOR=true gbp dch --commit --debian-branch=main --release --dch-opt=--upstream

.PHONY: deb
deb: debian
deb: build debian
debuild --no-lintian --lintian-hook "lintian --fail-on error,warning --suppress-tags bad-distribution-in-changes-file -- %p_%v_*.changes" --no-sign -b

.PHONY: release
Expand Down
66 changes: 66 additions & 0 deletions gen-wallpapers.sh
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.
13 changes: 0 additions & 13 deletions src/radxa-theme/wallpapers/radxa/metadata.json

This file was deleted.

25 changes: 25 additions & 0 deletions wallpapers/blocky-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions wallpapers/blocky-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions wallpapers/blocky-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions wallpapers/blocky-pink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 750b2f7

Please sign in to comment.