Compare commits

..

No commits in common. "7ea5f53bc5ca8a37963713646666bfe0d7eb8ecd" and "febc18408fa1fd051b815b9e98de16cdd4f961d4" have entirely different histories.

2 changed files with 15 additions and 16 deletions

View File

@ -6,8 +6,10 @@ Customisable SVG wallpaper with Decentrala logo.
You could replace all the colors with `replace_colors.sh`.
Initial colors are hardcoded, so it's one time trick.
For the second attempt do not forget to revert initial colors:
```
./replace_colors.sh wall.svg wall.repainted.svg 073642 B58900 586E75"
git restore wall.svg
```
## Initial colors

View File

@ -1,22 +1,19 @@
#!/bin/bash
if [ "$#" -ne 5 ]; then
echo "Usage: $0 <source> <target> <new_bg> <new_fg> <new_shadow>"
echo "Example: $0 wall.svg wall.repainted.svg 073642 B58900 586E75"
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <filename> <new_bg> <new_fg> <new_shadow>"
echo ""
echo "Example: $0 wall.svg 073642 B58900 586E75"
exit 1
fi
sourceFile=$1
targetFile=$2
new_bg=$3
new_fg=$4
new_shadow=$5
filename=$1
new_bg=$2
new_fg=$3
new_shadow=$4
cp $sourceFile $targetFile
sed -i "s/#222222/#$new_bg/g" "$filename"
sed -i "s/#444444/#$new_fg/g" "$filename"
sed -i "s/#262626/#$new_shadow/g" "$filename"
sed -i "s/#222222/#$new_bg/g" "$targetFile"
sed -i "s/#444444/#$new_fg/g" "$targetFile"
sed -i "s/#262626/#$new_shadow/g" "$targetFile"
echo "Colors replaced"
echo "$targetFile: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"
echo "Colors replaced in $filename: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"