Browse Source

install-gnome-extensions.sh

bookworm 0.1.9
pvincent 4 years ago
parent
commit
7b68619559
  1. 39
      src/main

39
src/main

@ -33,10 +33,11 @@ function askConfirmation (){
# variables and constants
BASEDIR=/opt/debian-gnome
LOGOUT_REQUIRED=false
GIT_REPOSITORY_RAW="https://git.artcode.re/pvincent/debian-gnome/raw/master"
ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed!
REQUIRED_PACKAGES=(git wget curl htop)
REQUIRED_PACKAGES=( git wget curl htop tilix jq unzip )
# required packages
for package in ${REQUIRED_PACKAGES[@]}; do
@ -48,7 +49,6 @@ for package in ${REQUIRED_PACKAGES[@]}; do
fi
done
## openssh-server
PGKNAME='openssh-server'
runVoid dpkg-query --status $PGKNAME
@ -106,7 +106,7 @@ if [ $? -eq 0 ];then
rm -rf $HOME/.mozilla/firefox
tar -xzvf /tmp/firefox.tgz -C $HOME/.mozilla/
else
echo "omit firefox profile"
echo "Omit firefox profile"
fi
## gnome settings
@ -146,7 +146,7 @@ if [ $? -ne 0 ] ; then
gsettings set org.gnome.shell.extensions.system-monitor icon-display false
gsettings set org.gnome.shell.extensions.system-monitor disk-display false
else
echo "gnome-shell-extension-system-monitor installed!"
echo "gnome-shell-extension-system-monitor already installed!"
fi
## gnome extension appindicator
@ -159,10 +159,39 @@ if [[ ! -d "$HOME/.local/share/gnome-shell/extensions/$UUID" ]]; then
gnome-shell-extension-tool -r "$UUID"
LOGOUT_REQUIRED=true
else
echo "gnome-shell-extension-appindicator installed!"
echo "gnome-shell-extension-appindicator already installed!"
fi
## install-gnome-extensions.sh
FILE_IGE="${BASEDIR}/tools/install-gnome-extensions.sh"
if [[ ! -f "$FILE_IGE" ]]; then
sudo mkdir -p "${BASEDIR}/tools"
sudo chown $(id -un) "${BASEDIR}/tools"
wget -N -q "https://raw.githubusercontent.com/cyfrost/install-gnome-extensions/master/install-gnome-extensions.sh" -O $FILE_IGE
chmod +x $FILE_IGE
else
echo "install-gnome-extensions.sh already installed!"
fi
# install extension with install-gnome-extensions.sh
declare -A extensions=(
[104]="netspeed@hedayaty.gmail.com"
[120]="places-menu@gnome-shell-extensions.gcampax.github.com"
)
for key in "${!extensions[@]}"; do
value="${extensions[$key]}"
if [[ ! -d "$HOME/.local/share/gnome-shell/extensions/${value}" ]]; then
echo -n "installing new extension <${value}>..."
$FILE_IGE --enable $key
echo DONE
LOGOUT_REQUIRED=true
else
echo "Extension <${value}> already installed!"
fi
done
## logout required
if [[ $LOGOUT_REQUIRED == true ]];then
echo
echo "****************************************************************"

Loading…
Cancel
Save