Browse Source

netspeed in Bytes

bookworm
pvincent@x260 3 years ago
parent
commit
c3bb0234f0
  1. 3
      .vscode/extensions.json
  2. 43
      src/main

3
.vscode/extensions.json

@ -0,0 +1,3 @@
{
"recommendations": ["mads-hartmann.bash-ide-vscode"]
}

43
src/main

@ -48,8 +48,8 @@ ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed!
REQUIRED_PACKAGES=( REQUIRED_PACKAGES=(
vim git wget vim git wget
python3 python3-pip python3 python3-pip
gir1.2-gtop-2.0
htop tilix jq unzip
gir1.2-gtop-2.0
htop tilix jq unzip
tilix bash-completion tilix bash-completion
nextcloud-desktop nautilus-nextcloud nautilus-share nautilus-image-converter nextcloud-desktop nautilus-nextcloud nautilus-share nautilus-image-converter
wl-clipboard wl-clipboard
@ -172,7 +172,7 @@ gsettings set org.gnome.nautilus.preferences click-policy 'single'
gsettings set org.gnome.mutter dynamic-workspaces false gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 1 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 tap-to-click true
#gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll false
gsettings set org.gnome.shell.extensions.netspeed use-bytes true
echo "## favorite apps" echo "## favorite apps"
echo "================" echo "================"
@ -250,25 +250,24 @@ for addon_id in "${!FIREFOX_ADDONS[@]}"; do
fi fi
done done
echo "# Firefox default settings" echo "# Firefox default settings"
echo "#=========================" echo "#========================="
if [[ ! -f /opt/firefox/firefox.cfg ]];then
cat <<EOF | sudo tee -a /opt/firefox/firefox.cfg
if [[ ! -f /opt/firefox/firefox.cfg ]]; then
cat <<EOF | sudo tee -a /opt/firefox/firefox.cfg
// IMPORTANT: Start your code on the 2nd line // IMPORTANT: Start your code on the 2nd line
lockPref("browser.pocket.enabled", false); lockPref("browser.pocket.enabled", false);
lockPref("extensions.pocket.enabled", false); lockPref("extensions.pocket.enabled", false);
lockPref("browser.shell.checkDefaultBrowser", false); lockPref("browser.shell.checkDefaultBrowser", false);
EOF EOF
cat <<EOF | sudo tee -a /opt/firefox/defaults/pref/autoconfig.js
cat <<EOF | sudo tee -a /opt/firefox/defaults/pref/autoconfig.js
pref("general.config.filename", "firefox.cfg"); pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0); pref("general.config.obscure_value", 0);
EOF EOF
else else
echo "Firefox default settings already defined!"
echo "Firefox default settings already defined!"
fi fi
echo "# favourite apps" echo "# favourite apps"
@ -287,20 +286,18 @@ echo
if [[ $NEED_GNOME_SHELL_RESTART == true ]]; then if [[ $NEED_GNOME_SHELL_RESTART == true ]]; then
#INTERESTING: nested wayland!!!
#dbus-run-session -- gnome-shell --nested --wayland
zenity --question --title "Rechargement de la session demandée" --width 600 --text "Des extensions GNOME ont été rajoutées à votre session.\n Voulez-vous rechargez votre session pour voir les changements ?" --timeout 10
case $? in
0)
echo "You answered yes"
killall -3 gnome-shell
;;
1) echo "You answered no" ;;
5) echo "Time out" ;;
*) echo "Unexpected!" ;;
esac
#INTERESTING: nested wayland!!!
#dbus-run-session -- gnome-shell --nested --wayland
zenity --question --title "Rechargement de la session demandée" --width 600 --text "Des extensions GNOME ont été rajoutées à votre session.\n Voulez-vous rechargez votre session pour voir les changements ?" --timeout 10
case $? in
0)
echo "You answered yes"
killall -3 gnome-shell
;;
1) echo "You answered no" ;;
5) echo "Time out" ;;
*) echo "Unexpected!" ;;
esac
fi
fi
Loading…
Cancel
Save