diff --git a/README.md b/README.md index a1fb0b9..2768e64 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -# debian-gnome +debian-gnome +============ configuration pour un bureau Gnome propre et efficace. utilisé lors des Instalalis dispensés par Libre.re -## install one-liner +install one-liner (finally two) +------------------ +`sudo apt install wget` `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 84392a8..a663d73 100755 --- a/src/main +++ b/src/main @@ -37,7 +37,7 @@ function askConfirmation (){ BASEDIR=/opt/debian-gnome GIT_REPOSITORY_RAW="https://git.artcode.re/pvincent/debian-gnome/raw/master" ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed! -REQUIRED_PACKAGES=( vim git wget curl htop tilix jq unzip python3-pip ) +REQUIRED_PACKAGES=( vim git wget curl htop tilix jq unzip python3-pip gir1.2-gtop-2.0 ) # required packages for package in ${REQUIRED_PACKAGES[@]}; do @@ -49,6 +49,13 @@ for package in ${REQUIRED_PACKAGES[@]}; do fi done +## debian-bash +if [[ ! -d /opt/debian-bash ]]; then + curl https://git.artcode.re/pvincent/debian-bash/raw/master/install.sh | sudo bash -s -- --host +else + echo "debian-bash already installed!" +fi + ## openssh-server PGKNAME='openssh-server' runVoid dpkg-query --status $PGKNAME @@ -64,13 +71,6 @@ else echo "${PGKNAME} already installed!" fi -## debian-bash -if [[ ! -d /opt/debian-bash ]]; then - curl https://git.artcode.re/pvincent/debian-bash/raw/master/install.sh | sudo bash -s -- --host -else - echo "debian-bash already installed!" -fi - ## firefox latest if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]];then set -e @@ -119,6 +119,18 @@ fi # echo "Omit firefox profile" # fi + +## firefox by default +xdg-settings set default-web-browser firefox-stable.desktop + +## disable apparmor evince +if [[ ! -L /etc/apparmor.d/disable/usr.bin.evince ]]; then + sudo ln -s /etc/apparmor.d/usr.bin.evince /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/disable/usr.bin.evince +else + echo "evince apparmor already disabled!" +fi + ## gnome default settings gsettings set org.gnome.settings-daemon.peripherals.keyboard remember-numlock-state true gsettings set org.gnome.desktop.interface clock-show-date true @@ -128,6 +140,7 @@ 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 @@ -168,8 +181,9 @@ gsettings set org.gnome.shell.extensions.system-monitor net-style digit gsettings set org.gnome.shell.extensions.system-monitor net-show-text false gsettings set org.gnome.shell.extensions.system-monitor icon-display false gsettings set org.gnome.shell.extensions.system-monitor disk-display false - - +gsettings set org.gnome.shell.extensions.netspeed show-sum true +gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true +gsettings set org.gnome.shell.extensions.dash-to-dock apply-custom-theme true # firefox addons declare -A FIREFOX_ADDONS @@ -178,13 +192,17 @@ FIREFOX_ADDONS['fr-dicollecte@dictionaries.addons.mozilla.org']='3581786/diction FIREFOX_ADDONS['chrome-gnome-shell@gnome.org']='898030/gnome_shell_integration-10.1-an+fx-linux.xpi' FIREFOX_ADDONS['jid1-ZAdIEUB7XOzOJw@jetpack']='3741831/duckduckgo_privacy_essentials-2021.3.8-an+fx.xpi' -PROFILE_INI=$HOME/.mozilla/firefox/profiles.ini -if [[ $(grep '\[Profile[^0]\]' $PROFILE_INI ) ]];then - PROFPATH=$(grep -E '^\[Profile|^Path|^Default' $PROFILE_INI | grep -1 '^Default=1' | grep '^Path' | cut -c6-) -else - PROFPATH=$(grep 'Path=' $PROFILE_INI | sed 's/^Path=//') -fi -echo $PROFPATH + +## TO REMOVE IF USELESS!!! +## can detect actual firefox profile +## +# PROFILE_INI=$HOME/.mozilla/firefox/profiles.ini +# if [[ $(grep '\[Profile[^0]\]' $PROFILE_INI ) ]];then +# PROFPATH=$(grep -E '^\[Profile|^Path|^Default' $PROFILE_INI | grep -1 '^Default=1' | grep '^Path' | cut -c6-) +# else +# PROFPATH=$(grep 'Path=' $PROFILE_INI | sed 's/^Path=//') +# fi +# echo $PROFPATH mkdir -p /opt/firefox/distribution/extensions for addon_id in "${!FIREFOX_ADDONS[@]}"; do