From 95a5c34ea1e74063168ad831de38c02c53f7f461 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 14 Mar 2021 21:01:03 +0400 Subject: [PATCH] logout_required --- README.md | 2 +- src/main | 30 +++++++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9097338..a1fb0b9 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ utilisé lors des Instalalis dispensés par Libre.re ## install one-liner -`wget https://git.artcode.re/pvincent/debian-gnome/raw/master/src/main -O /tmp/main && bash /tmp/main` \ No newline at end of file +`wget -q https://git.artcode.re/pvincent/debian-gnome/raw/master/src/main -O /tmp/main && bash /tmp/main` \ No newline at end of file diff --git a/src/main b/src/main index 864ab19..131aa92 100755 --- a/src/main +++ b/src/main @@ -33,6 +33,7 @@ function askConfirmation (){ ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed! GIT_REPOSITORY_RAW="https://git.artcode.re/pvincent/debian-gnome/raw/master" +LOGOUT_REQUIRED=false ## openssh-server PGKNAME='openssh-server' @@ -83,11 +84,11 @@ fi if [[ -d $HOME/.mozilla/firefox ]];then echo "Profile Firefox already created!" echo -n "Need acknowledgment before resetting firefox profile from SCRATCH! Do you accept " - askConfirmation y + askConfirmation N fi if [ $? -eq 0 ];then echo "resume processing new firefox profile" - wget $GIT_REPOSITORY_RAW/files/firefox.tgz -O /tmp/firefox.tgz + wget -q $GIT_REPOSITORY_RAW/files/firefox.tgz -O /tmp/firefox.tgz rm -rf $HOME/.mozilla/firefox tar -xzvf /tmp/firefox.tgz -C $HOME/.mozilla/ else @@ -95,8 +96,6 @@ else fi ## gnome settings -echo "default settings" -gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop','firefox-stable.desktop','org.gnome.Software.desktop']" 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' @@ -105,15 +104,23 @@ 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 +# favorite apps +favorite_apps=$(gsettings get org.gnome.shell favorite-apps) +if [[ "$favorite_apps" == "['firefox-esr.desktop', 'org.gnome.Evolution.desktop', 'rhythmbox.desktop', 'libreoffice-writer.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'yelp.desktop']" ]]; then + gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop','firefox-stable.desktop','org.gnome.Software.desktop']" +fi + ## gnome extension system-monitor runVoid dpkg-query --status gnome-shell-extension-system-monitor if [ $? -ne 0 ] ; then set -e sudo apt install gnome-shell-extension-system-monitor + LOGOUT_REQUIRED=true sudo cp /usr/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ gnome-shell-extension-tool -e system-monitor@paradoxxx.zero.gmail.com gnome-shell-extension-tool -r system-monitor@paradoxxx.zero.gmail.com + set +e gsettings set org.gnome.shell.extensions.system-monitor show-tooltip true gsettings set org.gnome.shell.extensions.system-monitor cpu-show-text false @@ -123,11 +130,20 @@ if [ $? -ne 0 ] ; then gsettings set org.gnome.shell.extensions.system-monitor net-style digit gsettings set org.gnome.shell.extensions.system-monitor icon-display false gsettings set org.gnome.shell.extensions.system-monitor disk-display false - - set +e else echo "gnome-shell-extension-system-monitor installed!" fi +## gnome extension appindicator +runVoid dpkg-query --status gnome-shell-extension-appindicator +if [ $? -ne 0 ] ; then + sudo apt install -y gnome-shell-extension-appindicator + LOGOUT_REQUIRED=true +fi - +if [[ $LOGOUT_REQUIRED == true ]];then + echo + echo "****************************************************************" + echo "please consider logging out, then log in again to apply changes!" + echo "****************************************************************" +fi \ No newline at end of file