2023-11-10 21:12:15 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Install wallpapers
|
|
|
|
# ------------------------------------------------------
|
2023-11-17 12:48:02 +00:00
|
|
|
echo -e "${GREEN}"
|
2023-11-10 21:12:15 +00:00
|
|
|
cat <<"EOF"
|
|
|
|
__ __ _ _
|
|
|
|
\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___
|
|
|
|
\ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__/ __|
|
|
|
|
\ V V / (_| | | | |_) | (_| | |_) | __/ | \__ \
|
|
|
|
\_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| |___/
|
|
|
|
|_| |_|
|
|
|
|
|
|
|
|
EOF
|
2023-11-17 12:48:02 +00:00
|
|
|
echo -e "${NONE}"
|
|
|
|
if [ ! -d ~/wallpaper ]; then
|
2023-11-10 21:12:15 +00:00
|
|
|
echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?"
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "If not, the script will install 3 default wallpapers in ~/wallpaper/"
|
|
|
|
echo ""
|
2023-11-10 21:12:15 +00:00
|
|
|
while true; do
|
2023-11-17 12:48:02 +00:00
|
|
|
read -p "Do you want to download the repository? (Yy/Nn): " yn
|
2023-11-10 21:12:15 +00:00
|
|
|
case $yn in
|
|
|
|
[Yy]* )
|
|
|
|
wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/wallpaper/-/archive/main/wallpaper-main.zip
|
|
|
|
unzip -o ~/Downloads/wallpaper-main.zip -d ~/Downloads/
|
|
|
|
if [ ! -d ~/wallpaper/ ]; then
|
|
|
|
mkdir ~/wallpaper
|
|
|
|
fi
|
|
|
|
cp ~/Downloads/wallpaper-main/* ~/wallpaper/
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "Wallpapers frpm the repository installed successfully."
|
2023-11-10 21:12:15 +00:00
|
|
|
break;;
|
|
|
|
[Nn]* )
|
|
|
|
if [ -d ~/wallpaper/ ]; then
|
|
|
|
echo "wallpaper folder already exists."
|
|
|
|
else
|
|
|
|
mkdir ~/wallpaper
|
|
|
|
fi
|
|
|
|
cp wallpapers/* ~/wallpaper
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "Default wallpapers installed successfully."
|
2023-11-10 21:12:15 +00:00
|
|
|
break;;
|
|
|
|
* ) echo "Please answer yes or no.";;
|
|
|
|
esac
|
|
|
|
done
|
2023-11-17 12:48:02 +00:00
|
|
|
else
|
|
|
|
echo "~/wallpaper folder already exsits."
|
|
|
|
fi
|
2023-11-10 21:12:15 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Copy default wallpaper to .cache
|
|
|
|
# ------------------------------------------------------
|
2023-11-17 12:48:02 +00:00
|
|
|
if [ ! -f ~/.cache/current_wallpaper.jpg ]; then
|
2023-11-10 21:12:15 +00:00
|
|
|
cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg
|
2023-11-17 12:48:02 +00:00
|
|
|
echo "Default wallpaper installed."
|
2023-11-10 21:12:15 +00:00
|
|
|
echo ""
|
2023-11-17 12:48:02 +00:00
|
|
|
fi
|