dmz-wallpaper/replace_colors.sh

20 lines
430 B
Bash
Raw Normal View History

2024-12-26 08:00:34 +00:00
#!/bin/bash
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <filename> <new_bg> <new_fg> <new_shadow>"
2024-12-26 08:07:03 +00:00
echo ""
echo "Example: $0 wall.svg 073642 B58900 586E75"
2024-12-26 08:00:34 +00:00
exit 1
fi
filename=$1
new_bg=$2
new_fg=$3
new_shadow=$4
sed -i "s/#222222/#$new_bg/g" "$filename"
sed -i "s/#444444/#$new_fg/g" "$filename"
sed -i "s/#262626/#$new_shadow/g" "$filename"
echo "Colors replaced in $filename: bg=$new_bg, fg=$new_fg, shadow=$new_shadow"