-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reworking of installation method (#18)
* add get.sh. * move get.sh reason for this is i don't want people to run this after cloning the repo * verbose installation script * Update README.md * Update README.md Changed the notice to a single quote instead of a list with one item, Changed around the names of the installation methods, Restructured the lists in the Manual installation method * Update install.sh Switched to Cases from If cases in shell * improved spacing and readability * merging get.sh and install.sh (untested) * formatting update * Update install.sh * Update install.sh * Added Abort Install function * rewrote install.sh * Redundant code reduced, maintainability improved * Changed spacing for echo statements Current spacing for echo statements caused issues with how the statements were printed onto the command line, changed tabbing to fix that. * some refactoring. * color stuff :3 * Reduced redundancy in the the unrecognised install * test * removed test, added exit status * Update release.yml testing self running github workflows * Update release.yml fucked up, was meaning to test something on another branch * Update README.md * tarballs and versioning system. * update release.yml * Update install.sh --------- Co-authored-by: Disaster2life <Yashraj.moghe@gmail.com>
- Loading branch information
1 parent
65ea773
commit 79dda12
Showing
3 changed files
with
141 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,125 @@ | ||
#!/bin/bash | ||
GTK_Apply () { | ||
rm -rf ~/.icons/Delta | ||
mkdir -p Delta ~/.icons | ||
cp -r Delta ~/.icons/ | ||
|
||
RESET="\x1b[0m" | ||
CORAL_PINK="\x1b[38;2;255;131;125m" | ||
FUZZY_WUZZY="\x1b[38;2;186;101;97m" | ||
PALE_GOLD="\x1b[38;2;248;193;140m" | ||
JASMINE="\x1b[38;2;249;222;129m" | ||
GRANNY_S_A="\x1b[38;2;152;220;154m" | ||
PALE_R_E_B="\x1b[38;2;150;223;211m" | ||
BABY_BLUE_E="\x1b[38;2;154;190;255m" | ||
DARK_PASTEL_BLUE="\x1b[38;2;114;141;190m" | ||
UBE="\x1b[38;2;140;114;189m" | ||
|
||
case $DESKTOP_SESSION in | ||
gnome | xubuntu | budgie-desktop | pantheon | xfce) | ||
Installation_Method=GTK | ||
Installation_Path=~/.icons | ||
;; | ||
plasma | plasmawayland | cinnamon) | ||
Installation_Method=QT | ||
Installation_Path=~/.local/share/icons | ||
;; | ||
esac | ||
|
||
function Delta_Apply () { | ||
echo -e "\nRunning $DARK_PASTEL_BLUE$Installation_Method$RESET\n" | ||
curl -L -O https://github.com/Delta-Icons/linux/releases/latest/download/delta-linux.tar.gz | ||
case $Installation_Method in | ||
Generic) | ||
sudo rm -rf "$Installation_Path"/Delta | ||
tar xf delta-linux.tar.gz --directory=delta-linux | ||
sudo mv delta-linux/ "$Installation_Path" | ||
;; | ||
*) | ||
rm -rf "$Installation_Path"/Delta | ||
tar xf delta-linux.tar.gz --directory="$Installation_Path" | ||
;; | ||
esac | ||
echo -en "\n${UBE}Finished!$RESET\n " | ||
} | ||
QT_Apply () { | ||
rm -rf ~/.local/share/icons/Delta | ||
mkdir -p Delta ~/.local/share/icons | ||
cp -r Delta ~/.local/share/icons/ | ||
} | ||
Common_Apply () { | ||
rm -rf /usr/share/icons/Delta | ||
sudo mkdir -p Delta /usr/share/icons | ||
sudo cp -r Delta /usr/share/icons | ||
} | ||
if [ "$DESKTOP_SESSION" = "gnome" ] || [ "$DESKTOP_SESSION" = "xubuntu" ] || [ "$DESKTOP_SESSION" = "budgie-desktop" ] || [ "$DESKTOP_SESSION" = "pantheon" ] || [ "$DESKTOP_SESSION" = "xfce" ] ; then | ||
GTK_Apply | ||
gsettings set org.gnome.desktop.interface icon-theme "Delta" | ||
echo "installed" | ||
exit 0 | ||
elif [ "$DESKTOP_SESSION" = "plasma" ]; then | ||
QT_Apply | ||
x=$(locate plasma-changeicons) | ||
$x Delta | ||
echo "installed" | ||
exit 0 | ||
elif [ "$DESKTOP_SESSION" = "cinnamon" ]; then | ||
read -p "Your Desktop Environment doesn't support a completely automatic install, you will have to select and apply the icon pack in your settings yourself, Proceed? y/N " proceed | ||
if [ "$proceed" = "y" ]; then | ||
QT_Apply | ||
|
||
echo -e "Welcome to the$CORAL_PINK Delta$RESET installation script!\n" | ||
case $Installation_Method in | ||
GTK) | ||
case $Installation_Method in | ||
GTK) | ||
echo -e "The current desktop ($PALE_GOLD${DESKTOP_SESSION^}$RESET) supports automatic installation.\n" | ||
;; | ||
QT) | ||
|
||
echo -e "The current desktop ($RESET$DESKTOP_SESSION$RESET) supports Manual installation. | ||
You will have to manually select the pack from your settings panel.\n" | ||
;; | ||
esac | ||
echo -e "Do you wish to continue?$PALE_R_E_B Y${RESET}/n" | ||
read -r -p "-> " proceed | ||
case $proceed in | ||
[Yy]* | "") | ||
case $Installation_Method in | ||
GTK) | ||
Delta_Apply | ||
case $DESKTOP_SESSION in | ||
xfce) | ||
xfconf-query -c xsettings -p /Net/IconThemeName -s "Delta" | ||
;; | ||
*) | ||
gsettings set org.gnome.desktop.interface icon-theme "Delta" | ||
;; | ||
esac | ||
;; | ||
QT) | ||
Delta_Apply | ||
echo "Delta has been moved, You can now apply Delta from your settings panel." | ||
echo "Coming soon to your local customisation store!" | ||
|
||
;; | ||
esac | ||
rm -rf delta-linux.tar.gz | ||
rm -rf delta-linux | ||
;; | ||
n) | ||
exit 0 | ||
elif [ "$proceed" = "n" ]; then | ||
exit 1 | ||
fi | ||
else | ||
echo "Your Desktop Environment isn't recognised or isn't supported, We can try a few things, or you can look online for other resources," | ||
read -p "Abort(0), Place in GTK non-root space(1), Place in Qt non-root space(2), Place in common space (requires root)(3)" whatdo | ||
if [ "$whatdo" = "0" ]; then | ||
exit 1 | ||
elif [ "$whatdo" = "1" ]; then | ||
GTK_Apply | ||
echo "You should now try and apply the icon pack" | ||
;; | ||
*) | ||
echo "invalid input" | ||
;; | ||
esac | ||
;; | ||
*) | ||
echo -e "Your Desktop Environment ($PALE_GOLD${DESKTOP_SESSION^}$RESET) isn't recognised or isn't supported yet. | ||
Please open an issue on the Linux branch, you can also try and install | ||
by looking up how your Desktop Environment handles Icon Packs. \n" | ||
|
||
echo -e "${JASMINE}0 -$RESET Abort | ||
${GRANNY_S_A}1 -$RESET Place in the GTK path (~/.icons) | ||
${PALE_R_E_B}2 -$RESET Place in the QT path (~/.local/share/icons) | ||
${BABY_BLUE_E}3 -$RESET Place in the$FUZZY_WUZZY ROOT$RESET path (/usr/share/icons)" | ||
|
||
read -rp "-> " whatdo | ||
case $whatdo in | ||
0) | ||
exit 0 | ||
elif [ "$whatdo" = "2" ]; then | ||
QT_Apply | ||
echo "You should now try and apply the icon pack" | ||
exit 0 | ||
elif [ "$whatdo" = "3" ]; then | ||
Common_Apply | ||
echo "You should now try and apply the icon pack" | ||
exit 0 | ||
fi | ||
fi | ||
;; | ||
1) | ||
Installation_Method=GTK | ||
Installation_Path=~/.icons | ||
;; | ||
2) | ||
Installation_Method=QT | ||
Installation_Path=~/.local/share/icons | ||
;; | ||
3) | ||
Installation_Method=Generic | ||
Installation_Path=/usr/share/icons | ||
;; | ||
*) | ||
echo "Invalid Input" | ||
exit 1 | ||
esac | ||
|
||
Delta_Apply | ||
echo "You should now try and apply the icon pack." | ||
;; | ||
esac | ||
exit 0 |