-
Notifications
You must be signed in to change notification settings - Fork 32
/
install.sh
56 lines (48 loc) · 1.82 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/bash
LHSCLOSE=false
URLBAR=false
REMOVE=false
NOLINE=false
readonly REPO_DIR="$(pwd)"
# readonly REPO_DIR="$(dirname "$(readlink "${0}")")"
source "${REPO_DIR}/lib-install.sh"
# Get options.
while getopts 'c,w,p,u,n,v,e,s,r:f:l' flag; do
case "${flag}" in
c ) TABSWAP=true;;
w ) WINDOWSWAP=true;;
p ) COMPACTTAB=true;;
f ) FIREFOX_DIR_HOME="${OPTARG}";;
l ) FIREFOX_DIR_HOME=~/.mozilla/firefox/;;
u ) URLBAR=true;;
n) NOLINE=true;;
v) TABVIEW=true;;
e) HIDEEXTENSION=true;;
s) NOTABSINGLE=true;;
r ) REMOVE=true;;
esac
done
echo -en "$COL_GREEN WhiteSur Firefox theme. $COL_RESET"
echo -en "\n"
echo -en "\n"
echo -e "${bold}WhiteSur installer"
echo -e "⚠ This is a script to add the theme into firefox, and enable it."
echo -e "⚠ Continuing will quit Firefox. Make sure you save any tabs before proceeding."
echo -en "\n"
warn "=> ${bold}$COL_RED CTRL+C $COL_RESET now to abort ${normal} or ${bold} $COL_GREEN ENTER ${normal} $COL_RESET to continue."
tput bel
read -n 1
actioninfo "Removing Firefox theme..."
remove_firefox_theme
success "Done! Firefox theme has been removed."
# Install Firefox
if [ "$REMOVE" = false ] ; then
actioninfo "Installing WhiteSur Firefox theme to your directory below"
install_firefox_theme
success "Done! WhiteSur Firefox theme has been installed."
actioninfo "If you have any issues with the theme not activating, follow the two steps below to toggle a setting within Firefox."
warn "Please go to: ${bold}$COL_RED about:config ${normal} $COL_RESET in Firefox (type it into the URL bar)"
warn "Search for ${bold}$COL_RED toolkit.legacyUserProfileCustomizations.stylesheets $COL_RESET and toggle it to `true`"
actioninfo "That's it, restart Firefox and you're all set!"
fi
echo "Done."