Hyprland-dotfiles/.install/wallpaper.sh

51 lines
1.8 KiB
Bash
Raw Normal View History

2023-11-10 16:12:15 -05:00
# ------------------------------------------------------
# Install wallpapers
# ------------------------------------------------------
2023-11-17 07:48:02 -05:00
echo -e "${GREEN}"
2023-11-10 16:12:15 -05:00
cat <<"EOF"
__ __ _ _
\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___
\ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__/ __|
\ V V / (_| | | | |_) | (_| | |_) | __/ | \__ \
\_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_| |___/
|_| |_|
EOF
2023-11-17 07:48:02 -05:00
echo -e "${NONE}"
if [ ! -d ~/wallpaper ]; then
2023-11-20 16:24:53 -05:00
echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?"
echo "If not, the script will install 3 default wallpapers in ~/wallpaper/"
echo ""
if gum confirm "Do you want to download the repository?" ;then
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/
echo "Wallpapers frpm the repository installed successfully."
2023-11-21 15:19:51 -05:00
elif [ $? -eq 130 ]; then
exit 130
2023-11-20 16:24:53 -05:00
else
if [ -d ~/wallpaper/ ]; then
echo "wallpaper folder already exists."
else
mkdir ~/wallpaper
fi
cp wallpapers/* ~/wallpaper
echo "Default wallpapers installed successfully."
fi
2023-11-17 07:48:02 -05:00
else
echo "~/wallpaper folder already exsits."
fi
2023-11-10 16:12:15 -05:00
echo ""
# ------------------------------------------------------
# Copy default wallpaper to .cache
# ------------------------------------------------------
2023-11-17 07:48:02 -05:00
if [ ! -f ~/.cache/current_wallpaper.jpg ]; then
2023-11-20 16:24:53 -05:00
cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg
echo "Default wallpaper installed."
echo ""
2023-11-17 07:48:02 -05:00
fi