papirus rework

This commit is contained in:
Anthony Axenov 2024-07-31 23:31:16 +08:00
parent 3ef8692684
commit 7159850e83
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -1,34 +1,27 @@
#!/bin/bash
##makedesc: Install papirus-icon-theme (latest)
source `dirname $0`/../helpers || exit 255
echo
echo "==============================================="
echo "Installing papirus-icon-theme (latest)..."
echo "==============================================="
echo
title
installed() {
command -v "$1" >/dev/null 2>&1
}
mkdir -p "$HOME/install/papirus-icon-theme" "$HOME/.local/share/icons/"
if installed git; then
mkdir -p "${HOME}/install/"
git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "${HOME}/install/papirus-icon-theme" --depth=1 --single-branch
clone_quick https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "$HOME/install/"
else
! installed wget && sudo apt install -y wget
mkdir -p "${HOME}/install/papirus-icon-theme"
wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "${HOME}/install/papirus-icon-theme.zip"
unzip -oq "${HOME}/install/papirus-icon-theme.zip" -d "${HOME}/install/papirus-icon-theme"
rm -f "${HOME}/install/papirus-icon-theme.zip"
download https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "$HOME/install/papirus-icon-theme.zip" && \
unzip -oq "$HOME/install/papirus-icon-theme.zip" -d "$HOME/install/papirus-icon-theme" && \
rm -f "$HOME/install/papirus-icon-theme.zip"
fi
mkdir -p "${HOME}/.local/share/icons/"
ln -sf "${HOME}/install/papirus-icon-theme/Papirus" "${HOME}/.local/share/icons/Papirus"
ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Dark" "${HOME}/.local/share/icons/Papirus-Dark"
ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Light" "${HOME}/.local/share/icons/Papirus-Light"
symlink "$HOME/install/papirus-icon-theme/Papirus" "$HOME/.local/share/icons/Papirus" && \
symlink "$HOME/install/papirus-icon-theme/Papirus-Dark" "$HOME/.local/share/icons/Papirus-Dark" && \
symlink "$HOME/install/papirus-icon-theme/Papirus-Light" "$HOME/.local/share/icons/Papirus-Light"
[ $? = 0 ] && {
echo
success "Papirus icons installed!"
info "You can find them in $HOME/.local/share/icons/"
echo
}
echo
echo "Finish! Don't forget to change current icon theme."
echo "You can find them here:"
echo -e "\t${HOME}/.local/share/icons/"
echo