#!/bin/bash ################################################################################ # reconfigurationScript # # # # This script is suppose to be uploaded and used with internet connection. # # The remote user of this script is supposed to use terminal emulator. # # To access the script and run it. # # # # I Recommend the GET command alias of lwp-request command # # and the most popular command-line interpreter Bash. # # # # GET https://example.org/reconfgurationScript.bash | bash # # # # However the same results can be achieved with # # other command-line tools like curl and wget # # # # # # NOTES # # # # # # # # # ################################################################################ function installExtension(){ declare extensionUUID=$1; declare server="https://extensions.gnome.org/download-extension"; declare version="?shell_version=9.99.9"; declare url="$server/$extensionUUID.shell-extension.zip$version"; wget "$url"; declare download_filename=$(basename "$url"); gnome-extensions install "$download_filename"; gnome-extensions enable "$extensionUUID"; rm "$download_filename"; } function main(){ # --- Gnome-Shell Version Check -------------------------------------------- # This script requires gnome-extensions command line tool # This command line tool is required to install Gnome Extensions declare current_gnome_version=$(gnome-shell --version | cut -d ' ' -f3 | tr -d "."); declare gnome_extensions_introduced_in_version="3341"; if [ "$current_gnome_version" -le "$gnome_extensions_introduced_in_version" ]; then echo Your Gnome Shell version is too old. echo gnome-extensions command line tool has not been introduced yet in your version of Gnome. echo only Ubuntu 19.10 version and above contains gnome-shell 3.34.1 with available gnome-extensions tool read -p "Press [Enter] key to exit..."; exit fi # Try to Download and install gnome-extensions tool for Ubuntu 18.04 and 18.10, # Maybe it is possible to support Ubuntu 17.10 and 17.04 however, # the more outdated the gnome-shell, the higher the risk of an error # while using tool like gnome-extensions that is suppose to work # with more recent versions of gnome-shell. # Unsure if any harm could happen while using the # gnome-extensions tool with outdated versions of gnome-shell. # --- Undo Changes and remove extensions -------------------------------------------- # If the reconfiguration has been done before undo the changes to the system if [ -f "$HOME/.config/reconfiguration/reconfigurationHasBeenDoneBefore" ]; then # Remove extensions and restore old ones gnome-extensions uninstall "dash-to-panel@jderose9.github.com"; gnome-extensions uninstall "ding@rastersoft.com"; gnome-extensions enable "ubuntu-dock@ubuntu.com"; gnome-extensions enable "desktop-icons@csoriano"; busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")' # Check if Google Chrome was installed before. Do not remove. rm -rf "$HOME/.config/reconfiguration/" exit fi # --- Install [Important] Shell Extensions -------------------------------------------- # Dash to Dock installExtension "dash-to-panel@jderose9.github.com"; declare dash_to_panel_schemas="$HOME/.local/share/gnome-shell/extensions/dash-to-panel@jderose9.github.com/schemas" gsettings --schemadir "$dash_to_panel_schemas" set org.gnome.shell.extensions.dash-to-panel panel-size 46; gsettings --schemadir "$dash_to_panel_schemas" set org.gnome.shell.extensions.dash-to-panel appicon-padding 5; gsettings --schemadir "$dash_to_panel_schemas" set org.gnome.shell.extensions.dash-to-panel window-preview-size 150; # Desktop Icons NG installExtension "ding@rastersoft.com"; declare desktop_icons_ng_schemas="$HOME/.local/share/gnome-shell/extensions/ding@rastersoft.com/schemas"; gsettings --schemadir "$desktop_icons_ng_schemas" set org.gnome.shell.extensions.ding icon-size "small"; # Disable conflicting extensions gnome-extensions disable "ubuntu-dock@ubuntu.com"; gnome-extensions disable "desktop-icons@csoriano"; busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")' # --- Install [Simple] Shell Extensions -------------------------------------------- # Open Nautilus folder as Administrator # --- Add Nautilus Templates ------------------------------------------------- # --- Install Google Chrome ------------------------------------------------- # --- Install Google Chrome Extensions ------------------------------------------------- # uBlock Origin Extension # GNOME Shell integration Extension # AutoScroll Extension # --- Install Drawing application for Gnome by @maoschanzmaoschanz ------------------------------------------------- # --- Install Fish command-line shell ------------------------------------------------- # --- Import and configure Essential commands ------------------------------------------------- # Configure $HOME/.bashrc # Add custom commands to $HOME/bin # --- Configure input language ------------------------------------------------- # Add second native language # --- Configure Gnome Text Editor Gedit ------------------------------------------------- # Set tab-size to 4 # Turn on Display Line Numbers # --- Configure Firefox ------------------------------------------------- # Untick Title-Bar # Install GNOME Shell integration Extension # --- Remove Firefox Icon from Favorites ------------------------------------------------- # --- Create NTFS partition for content sharing between Windows ------------------------------------------------- # --- Install GIMP Image Manipulation Program ------------------------------------------------- # --- Install Olive Video Editor ------------------------------------------------- # --- Mark successful reconfiguration ------------------------------------------------- mkdir "$HOME/.config/reconfiguration"; echo "" > "$HOME/.config/reconfiguration/reconfigurationHasBeenDoneBefore"; } main;