Add dracula cursors

This commit is contained in:
Tobias Reisinger 2022-10-22 01:39:28 +02:00
parent e0b2cc16fb
commit b7c91e79d9
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 20 additions and 3 deletions

View file

@ -49,6 +49,10 @@ _autoinstall_all () {
_autoinstall_git \
"https://github.com/dracula/gtk.git" \
"$HOME/.themes/Dracula"
_autoinstall_archive \
"https://github.com/dracula/gtk/releases/download/v3.0/Dracula-cursors.tar.xz" \
"$HOME/.icons/Dracula-cursors.tar.xz"
}
_autoinstall_git () {
@ -67,7 +71,19 @@ _autoinstall_file () {
file_path=$(dirname "$2")
mkdir -p "$file_path"
cd "$file_path" || exit
curl -sSo "$2" "$1"
curl -LsSo "$2" "$1"
fi
}
_autoinstall_archive () {
if [ ! -f "$2" ]
then
echo "Installing archive $1 to $2"
file_path=$(dirname "$2")
mkdir -p "$file_path"
cd "$file_path" || exit
curl -LsSo "$2" "$1"
tar xaf "$2"
fi
}
@ -75,5 +91,6 @@ case $1 in
all) _autoinstall_all ;;
git) _autoinstall_git "$2" "$3" ;;
file) _autoinstall_file "$2" "$3" ;;
archive) _autoinstall_archive "$2" "$3" ;;
*) echo "'$1' is not valid" ;;
esac