|
|
@ -3,7 +3,7 @@ |
|
|
|
## FUNCTIONS |
|
|
|
## --------- |
|
|
|
|
|
|
|
function trap_error { |
|
|
|
function trap_error() { |
|
|
|
error_code=$1 |
|
|
|
error_line=$2 |
|
|
|
|
|
|
@ -13,8 +13,7 @@ function trap_error { |
|
|
|
exit $error_code |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function runVoid { |
|
|
|
function runVoid() { |
|
|
|
trap - ERR |
|
|
|
local COMMAND="$@" |
|
|
|
bash -c "${COMMAND}" >/dev/null 2>&1 |
|
|
@ -22,8 +21,7 @@ function runVoid { |
|
|
|
trap 'trap_error $? $LINENO' ERR |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function askConfirmation { |
|
|
|
function askConfirmation() { |
|
|
|
case "$1" in |
|
|
|
y | Y | yes | YES) |
|
|
|
QUESTION="(Y/n)?" |
|
|
@ -47,19 +45,18 @@ function askConfirmation { |
|
|
|
|
|
|
|
BASEDIR=/opt/debian-gnome |
|
|
|
ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed! |
|
|
|
REQUIRED_PACKAGES=( \ |
|
|
|
vim git wget curl \ |
|
|
|
htop tilix jq unzip python3-pip gir1.2-gtop-2.0 \ |
|
|
|
tilix bash-completion \ |
|
|
|
nextcloud-desktop nautilus-nextcloud nautilus-share nautilus-image-converter \ |
|
|
|
cups hplip-data \ |
|
|
|
REQUIRED_PACKAGES=( |
|
|
|
vim git wget curl |
|
|
|
htop tilix jq unzip python3-pip gir1.2-gtop-2.0 |
|
|
|
tilix bash-completion |
|
|
|
nextcloud-desktop nautilus-nextcloud nautilus-share nautilus-image-converter |
|
|
|
cups hplip-data |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
## MAIN |
|
|
|
## --------- |
|
|
|
|
|
|
|
[ `id -u` -eq 0 ] && echo 'normal user required' && exit -1 |
|
|
|
[ $(id -u) -eq 0 ] && echo 'normal user required' && exit -1 |
|
|
|
|
|
|
|
echo "# updating repositories" |
|
|
|
echo "===================" |
|
|
@ -75,7 +72,7 @@ echo "===================" |
|
|
|
for package in ${REQUIRED_PACKAGES[@]}; do |
|
|
|
runVoid dpkg-query --status $package |
|
|
|
if [ $runVoidError -ne 0 ]; then |
|
|
|
echo -n "installing package <$package> ... " ; |
|
|
|
echo -n "installing package <$package> ... " |
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt install -y $package |
|
|
|
echo "DONE" |
|
|
|
fi |
|
|
@ -121,13 +118,12 @@ else |
|
|
|
echo "allow-hotplug already set up" |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
echo "## firefox latest" |
|
|
|
echo "=================" |
|
|
|
if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]]; then |
|
|
|
set -e |
|
|
|
cd /tmp |
|
|
|
wget `curl 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US' | cut -d '"' -f2` -O firefox-latest.tar.bz2 |
|
|
|
wget $(curl 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US' | cut -d '"' -f2) -O firefox-latest.tar.bz2 |
|
|
|
sudo mkdir /opt/firefox -p |
|
|
|
sudo chown $USER /opt/firefox |
|
|
|
tar -xjf firefox-latest.tar.bz2 -C /opt |
|
|
@ -167,7 +163,7 @@ fi |
|
|
|
|
|
|
|
echo "## gnome default settings" |
|
|
|
echo "=============" |
|
|
|
gsettings set org.gnome.settings-daemon.peripherals.keyboard remember-numlock-state true |
|
|
|
#gsettings set org.gnome.settings-daemon.peripherals.keyboard remember-numlock-state true |
|
|
|
gsettings set org.gnome.desktop.interface clock-show-date true |
|
|
|
gsettings set org.gnome.nautilus.preferences click-policy 'single' |
|
|
|
gsettings set org.gnome.mutter dynamic-workspaces false |
|
|
@ -175,7 +171,6 @@ gsettings set org.gnome.desktop.wm.preferences num-workspaces 1 |
|
|
|
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true |
|
|
|
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false |
|
|
|
|
|
|
|
|
|
|
|
echo "## favorite apps" |
|
|
|
echo "================" |
|
|
|
favorite_apps=$(gsettings get org.gnome.shell favorite-apps) |
|
|
@ -215,7 +210,6 @@ for extension in "${EXTENSIONS[@]}"; do |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
echo "# gnome extra settings" |
|
|
|
echo "======================" |
|
|
|
gsettings set org.gnome.shell.extensions.system-monitor show-tooltip true |
|
|
|