-
-
Save rkennesson/5d89bd7607a376dbd2e133b59d6a7275 to your computer and use it in GitHub Desktop.
| #!/bin/bash | |
| # https://github.com/NicolasBernaerts/ubuntu-scripts/ | |
| # -------------------------------------------- | |
| # Install extension from Gnome Shell Extensions site | |
| # | |
| # See http://bernaerts.dyndns.org/linux/76-gnome/345-gnome-shell-install-remove-extension-command-line-script | |
| # for installation instruction | |
| # | |
| # Revision history : | |
| # 13/07/2013 - V1.0 : Creation by N. Bernaerts | |
| # 15/03/2015 - V1.1 : Update thanks to Michele Gazzetti | |
| # 02/10/2015 - V1.2 : Disable wget gzip compression | |
| # 05/07/2016 - V2.0 : Complete rewrite (system path updated thanks to Morgan Read) | |
| # 09/08/2016 - V2.1 : Handle exact or previously available version installation (idea from eddy-geek) | |
| # 09/09/2016 - V2.2 : Switch to gnome-shell to get version [UbuntuGnome 16.04] (thanks to edgard) | |
| # 05/11/2016 - V2.3 : Trim Gnome version and add Fedora compatibility (thanks to Cedric Brandenbourger) | |
| # ------------------------------------------- | |
| # check tools availability | |
| command -v gnome-shell >/dev/null 2>&1 || { zenity --error --text="Please install gnome-shell"; exit 1; } | |
| command -v unzip >/dev/null 2>&1 || { zenity --error --text="Please install unzip"; exit 1; } | |
| command -v wget >/dev/null 2>&1 || { zenity --error --text="Please install wget"; exit 1; } | |
| # install path (user and system mode) | |
| USER_PATH="$HOME/.local/share/gnome-shell/extensions" | |
| [ -f /etc/debian_version ] && SYSTEM_PATH="/usr/local/share/gnome-shell/extensions" || SYSTEM_PATH="/usr/share/gnome-shell/extensions" | |
| # set gnome shell extension site URL | |
| GNOME_SITE="https://extensions.gnome.org" | |
| # get current gnome version (major and minor only) | |
| GNOME_VERSION="$(DISPLAY=":0" gnome-shell --version | tr -cd "0-9." | cut -d'.' -f1,2)" | |
| # default installation path for default mode (user mode, no need of sudo) | |
| INSTALL_MODE="user" | |
| EXTENSION_PATH="${USER_PATH}" | |
| INSTALL_SUDO="" | |
| # help message if no parameter | |
| if [ ${#} -eq 0 ]; | |
| then | |
| echo "Install/remove extension from Gnome Shell Extensions site https://extensions.gnome.org/" | |
| echo "Extension ID should be retrieved from https://extensions.gnome.org/extension/<ID>/extension-name/" | |
| echo "Parameters are :" | |
| echo " --install Install extension (default)" | |
| echo " --remove Remove extension" | |
| echo " --user Installation/remove in user mode (default)" | |
| echo " --system Installation/remove in system mode" | |
| echo " --version <version> Gnome version (system detected by default)" | |
| echo " --extension-id <id> Extension ID in Gnome Shell Extension site (compulsory)" | |
| exit 1 | |
| fi | |
| # iterate thru parameters | |
| while test ${#} -gt 0 | |
| do | |
| case $1 in | |
| --install) ACTION="install"; shift; ;; | |
| --remove) ACTION="remove"; shift; ;; | |
| --user) INSTALL_MODE="user"; shift; ;; | |
| --system) INSTALL_MODE="system"; shift; ;; | |
| --version) shift; GNOME_VERSION="$1"; shift; ;; | |
| --extension-id) shift; EXTENSION_ID="$1"; shift; ;; | |
| *) echo "Unknown parameter $1"; shift; ;; | |
| esac | |
| done | |
| # if no extension id, exit | |
| [ "${EXTENSION_ID}" = "" ] && { echo "You must specify an extension ID"; exit; } | |
| # if no action, exit | |
| [ "${ACTION}" = "" ] && { echo "You must specify an action command (--install or --remove)"; exit; } | |
| # if system mode, set system installation path and sudo mode | |
| [ "${INSTALL_MODE}" = "system" ] && { EXTENSION_PATH="${SYSTEM_PATH}"; INSTALL_SUDO="sudo"; } | |
| # create temporary files | |
| TMP_DESC=$(mktemp -t ext-XXXXXXXX.txt) | |
| TMP_ZIP=$(mktemp -t ext-XXXXXXXX.zip) | |
| TMP_VERSION=$(mktemp -t ext-XXXXXXXX.ver) | |
| rm ${TMP_DESC} ${TMP_ZIP} | |
| # get extension description | |
| wget --quiet --header='Accept-Encoding:none' -O "${TMP_DESC}" "${GNOME_SITE}/extension-info/?pk=${EXTENSION_ID}" | |
| # get extension name | |
| EXTENSION_NAME=$(sed 's/^.*name[\": ]*\([^\"]*\).*$/\1/' "${TMP_DESC}") | |
| # get extension description | |
| EXTENSION_DESCR=$(sed 's/^.*description[\": ]*\([^\"]*\).*$/\1/' "${TMP_DESC}") | |
| # get extension UUID | |
| EXTENSION_UUID=$(sed 's/^.*uuid[\": ]*\([^\"]*\).*$/\1/' "${TMP_DESC}") | |
| # if ID not known | |
| if [ ! -s "${TMP_DESC}" ]; | |
| then | |
| echo "Extension with ID ${EXTENSION_ID} is not available from Gnome Shell Extension site." | |
| # else, if installation mode | |
| elif [ "${ACTION}" = "install" ]; | |
| then | |
| # extract all available versions | |
| sed "s/\([0-9]*\.[0-9]*[0-9\.]*\)/\n\1/g" "${TMP_DESC}" | grep "pk" | grep "version" | sed "s/^\([0-9\.]*\).*$/\1/" > "${TMP_VERSION}" | |
| # check if current version is available | |
| VERSION_AVAILABLE=$(grep "^${GNOME_VERSION}$" "${TMP_VERSION}") | |
| # if version is not available, get the next one available | |
| if [ "${VERSION_AVAILABLE}" = "" ] | |
| then | |
| echo "${GNOME_VERSION}" >> "${TMP_VERSION}" | |
| VERSION_AVAILABLE=$(cat "${TMP_VERSION}" | sort -V | sed "1,/${GNOME_VERSION}/d" | head -n 1) | |
| fi | |
| # if still no version is available, error message | |
| if [ "${VERSION_AVAILABLE}" = "" ] | |
| then | |
| echo "Gnome Shell version is ${GNOME_VERSION}." | |
| echo "Extension ${EXTENSION_NAME} is not available for this version." | |
| echo "Available versions are :" | |
| sed "s/\([0-9]*\.[0-9]*[0-9\.]*\)/\n\1/g" "${TMP_DESC}" | grep "pk" | grep "version" | sed "s/^\([0-9\.]*\).*$/\1/" | sort -V | xargs | |
| # else, install extension | |
| else | |
| # get extension description | |
| wget --quiet --header='Accept-Encoding:none' -O "${TMP_DESC}" "${GNOME_SITE}/extension-info/?pk=${EXTENSION_ID}&shell_version=${VERSION_AVAILABLE}" | |
| # get extension download URL | |
| EXTENSION_URL=$(sed 's/^.*download_url[\": ]*\([^\"]*\).*$/\1/' "${TMP_DESC}") | |
| # download extension archive | |
| wget --quiet --header='Accept-Encoding:none' -O "${TMP_ZIP}" "${GNOME_SITE}${EXTENSION_URL}" | |
| # unzip extension to installation folder | |
| ${INSTALL_SUDO} mkdir -p ${EXTENSION_PATH}/${EXTENSION_UUID} | |
| ${INSTALL_SUDO} unzip -oq "${TMP_ZIP}" -d ${EXTENSION_PATH}/${EXTENSION_UUID} | |
| ${INSTALL_SUDO} chmod +r ${EXTENSION_PATH}/${EXTENSION_UUID}/* | |
| # list enabled extensions (remove @as in case of no extension enabled) | |
| EXTENSION_LIST=$(gsettings get org.gnome.shell enabled-extensions | sed 's/^@as //' | tr -d '[]') | |
| [ "${EXTENSION_LIST}" != "" ] && EXTENSION_LIST="${EXTENSION_LIST}," | |
| # if extension not already enabled, declare it | |
| EXTENSION_ENABLED=$(echo ${EXTENSION_LIST} | grep ${EXTENSION_UUID}) | |
| [ "$EXTENSION_ENABLED" = "" ] && gsettings set org.gnome.shell enabled-extensions "[${EXTENSION_LIST}'${EXTENSION_UUID}']" | |
| # success message | |
| echo "Gnome Shell version is ${GNOME_VERSION}." | |
| echo "Extension ${EXTENSION_NAME} version ${VERSION_AVAILABLE} has been installed in ${INSTALL_MODE} mode (Id ${EXTENSION_ID}, Uuid ${EXTENSION_UUID})" | |
| echo "Restart Gnome Shell to take effect." | |
| fi | |
| # else, it is remove mode | |
| else | |
| # remove extension folder | |
| ${INSTALL_SUDO} rm -f -r "${EXTENSION_PATH}/${EXTENSION_UUID}" | |
| # success message | |
| echo "Extension ${EXTENSION_NAME} has been removed in ${INSTALL_MODE} mode (Id ${EXTENSION_ID}, Uuid ${EXTENSION_UUID})" | |
| echo "Restart Gnome Shell to take effect." | |
| fi | |
| # remove temporary files | |
| rm -f ${TMP_DESC} ${TMP_ZIP} ${TMP_VERSION} |
| INFO: | |
| http://www.omgubuntu.co.uk/2017/10/things-to-do-after-installing-ubuntu-17-10 | |
| https://github.com/NicolasBernaerts/ubuntu-scripts/blob/master/ubuntugnome/gnomeshell-extension-manage | |
| https://itsfoss.com/things-installing-ubuntu-17-10/ | |
| https://www.tecmint.com/useful-basic-commands-of-apt-get-and-apt-cache-for-package-management/ | |
| tips: | |
| https://askubuntu.com/questions/307/how-can-ppas-be-removed | |
| https://popey.com/blog/posts/2009/06/05/easy_script_to_get_and_install_ppa_gpg_keys.html | |
| https://askubuntu.com/questions/604988/how-to-remove-a-apt-key-which-i-have-added | |
| https://itsfoss.com/essential-linux-applications/ | |
| https://www.linuxbabe.com/ubuntu/install-python-3-6-ubuntu-16-04-16-10-17-04 | |
| https://askubuntu.com/questions/318716/how-do-i-look-inside-apt-trusted-gpg | |
| $apt-key list | |
| #to delete a key | |
| $sudo apt-key del C659 #last 4 of pub key | |
| ---- | |
| sudo ufw enable | |
| ---- | |
| app installs | |
| https://askubuntu.com/questions/906472/how-do-i-install-vlc-3-0-on-ubuntu-zesty-17-04/906523 | |
| sudo apt install vlc gimp gdebi 'clang*5.0' | |
| ---- | |
| clang setup | |
| --clion setup | |
| #required for cmake and CLion | |
| export CC=clang | |
| export CXX=clang++ | |
| -- | |
| ==vscode clang-format plugin https://marketplace.visualstudio.com/items?itemName=xaver.clang-format | |
| "clang-format.executable": "/usr/bin/clang-format" | |
| == | |
| https://peintinger.com/?p=432 | |
| https://askubuntu.com/questions/584711/clang-and-clang-not-found-after-installing-the-clang-3-5-package | |
| https://stackoverflow.com/questions/12787757/how-to-use-the-command-update-alternatives-config-java | |
| http://williamdemeo.github.io/linux/update-alternatives.html | |
| link clang suite to clang version with --slave | |
| ``` | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 --slave /usr/bin/clang-check clang-check /usr/bin/clang-check-5.0 --slave /usr/bin/clang-query clang-query /usr/bin/clang-query-5.0 --slave /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-5.0 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-5.0 --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-5.0 | |
| ``` | |
| ``` | |
| sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-5.0 100 | |
| sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-5.0 100 | |
| ``` | |
| If at any time you need to switch back to gcc or g++ you can use the --config option: | |
| sudo update-alternatives --config c++ | |
| --- | |
| http://blog.conan.io/2016/05/10/Programming-C++-with-the-4-Cs-Clang,-CMake,-CLion-and-Conan.html | |
| --- | |
| codelite | |
| sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc | |
| sudo apt-add-repository 'deb https://repos.codelite.org/ubuntu/ artful universe' | |
| sudo apt-get update | |
| sudo apt-get install codelite wxcrafter | |
| #location installed binaries | |
| /usr/lib/llvm-5.0/ | |
| ---- | |
| #canonical partners | |
| #https://askubuntu.com/questions/14629/how-do-i-enable-the-partner-repository | |
| sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner" | |
| ---- | |
| https://askubuntu.com/questions/16225/how-can-i-accept-the-microsoft-eula-agreement-for-ttf-mscorefonts-installer | |
| #this will accept the license that the restricted-extras meta package (when in stalling mscorefonts) asks for | |
| # then install restricted and this part should be skipped | |
| echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections | |
| # try top one first # echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | |
| sudo apt-get install ttf-mscorefonts-installer | |
| ---- | |
| restricted-extras | |
| sudo apt-get install ubuntu-restricted-extras | |
| ---- | |
| Firefox Quantum | |
| sudo add-apt-repository ppa:mozillateam/firefox-next | |
| sudo apt update | |
| sudo apt install firefox | |
| ---- | |
| git | |
| sudo add-apt-repository ppa:git-core/ppa | |
| sudo apt update | |
| sudo apt install git | |
| ---- | |
| Gnome Settings | |
| gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" | |
| System Settings-> Devices-> Displays > night light | |
| --- | |
| Gnome screenshot hotkeys | |
| PrtSc = Capture screen | |
| Alt+PrtSc = Capture Active App/Window | |
| Shift+PrtSc = Capture Area | |
| --- | |
| Gnome Extensions | |
| https://extensions.gnome.org/extension/1031/topicons/ | |
| ---- | |
| sudo apt-get remove --purge ubuntu-web-launchers | |
| sudo apt install gnome-tweak-tool | |
| ---- | |
| ukuu | |
| sudo add-apt-repository ppa:teejee2008/ppa | |
| sudo apt-get update && sudo apt-get install ukuu | |
| xhost + #remove access restricions REF: https://www.linuxquestions.org/questions/debian-26/gtk-warning-**-cannot-open-display-0-0-a-807450/ | |
| sudo ukuu --install v4.13.10 | |
| ---- | |
| VSCode | |
| # Install key !!curl not installed by default maybe use wget instead!! | |
| curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
| # Install repo | |
| sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' | |
| # Update apt-get | |
| sudo apt-get update | |
| # Install | |
| sudo apt-get install code # or code-insiders | |
| #extensions | |
| https://marketplace.visualstudio.com/items?itemName=Tyriar.vscode-terminal-here | |
| https://marketplace.visualstudio.com/items?itemName=hoovercj.vscode-newfile-languagemode | |
| https://marketplace.visualstudio.com/items?itemName=patbenatar.advanced-new-file | |
| ---- | |
| Sublime Text 3 | |
| Install the GPG key: | |
| wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
| Ensure apt is set up to work with https sources: | |
| sudo apt-get install apt-transport-https | |
| Select the channel to use: | |
| Stable | |
| echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
| Dev !!Need license key for dev channel!! | |
| echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
| Update apt sources and install Sublime Text | |
| sudo apt-get update | |
| sudo apt-get install sublime-text | |
| ---- | |
| Google Chrome | |
| wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable -y | |
| ---- | |
| Themes | |
| http://www.noobslab.com/p/themes-icons.html | |
| ---- | |
| Pop Theme | |
| sudo add-apt-repository ppa:system76/pop | |
| sudo apt update | |
| sudo apt install pop-theme | |
| Fonts | |
| Window Titles: Fira Sans SemiBold 10 | |
| Interface: Fira Sans Book 10 | |
| Documents: Roboto Slab Regular 11 | |
| Monospace: Fira Mono Regular 11 | |
| ---- |
| sudo apt update | |
| sudo apt dist-upgrade -y | |
| #Basic Settings | |
| sudo apt-get remove --purge ubuntu-web-launchers -y | |
| sudo apt install vlc gimp gdebi curl -y | |
| sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner" | |
| #Restricted Extras/Fonts | |
| echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections | |
| sudo apt-get install ttf-mscorefonts-installer -y | |
| sudo apt-get install ubuntu-restricted-extras -y | |
| #Gnome | |
| sudo apt install gnome-tweak-tool -y | |
| gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']" | |
| #Gnome Pop Theme | |
| sudo add-apt-repository ppa:system76/pop | |
| sudo apt upTdate | |
| sudo apt install pop-theme -y | |
| #googlechrome | |
| wget -qO - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo apt-add-repository 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | |
| sudo apt update | |
| sudo apt install google-chrome-stable -y | |
| #sublime | |
| wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
| sudo apt-add-repository 'deb https://download.sublimetext.com/ apt/stable/' | |
| sudo apt update | |
| sudo apt install sublime-text -y | |
| #vscode | |
| sudo add-apt-repository 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main' | |
| #curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo wget -qO - /dev/null https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | |
| sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | |
| sudo apt-get update | |
| sudo apt-get install code -y | |
| code --install-extension Tyriar.vscode-terminal-here | |
| code --install-extension DavidAnson.vscode-markdownlint | |
| code --install-extension EditorConfig.EditorConfig | |
| code --install-extension PKief.material-icon-theme | |
| code --install-extension arc0re.theme-xcode-midnight | |
| code --install-extension be5invis.vscode-icontheme-nomo-dark | |
| code --install-extension donjayamanne.githistory | |
| code --install-extension dracula-theme.theme-dracula | |
| code --install-extension felipecaputo.git-project-manager | |
| code --install-extension formulahendry.auto-close-tag | |
| code --install-extension gerane.Theme-Batman | |
| code --install-extension gerane.Theme-BatmanLight | |
| code --install-extension gerane.Theme-Xcodedefault | |
| code --install-extension hoovercj.vscode-newfile-languagemode | |
| code --install-extension krizzdewizz.vscode-icon-rotation | |
| code --install-extension leveluptutorials.theme-levelup | |
| code --install-extension ms-vscode.cpptools | |
| code --install-extension patbenatar.advanced-new-file | |
| code --install-extension platformio.platformio-ide | |
| code --install-extension qinjia.seti-icons | |
| code --install-extension robertohuertasm.vscode-icons | |
| code --install-extension ryu1kn.annotator | |
| code --install-extension waderyan.gitblame | |
| code --install-extension webfreak.debug | |
| code --install-extension wesbos.theme-cobalt2 | |
| #ukuu | |
| sudo add-apt-repository ppa:teejee2008/ppa | |
| sudo apt-get update | |
| sudo apt-get install ukuu -y | |
| xhost si:localuser:$USER | |
| sudo ukuu --install v4.13.10 | |
| #firefoxquantum | |
| sudo add-apt-repository ppa:mozillateam/firefox-next | |
| sudo apt update | |
| sudo apt install firefox -y | |
| #gitppa | |
| sudo add-apt-repository ppa:git-core/ppa | |
| sudo apt update | |
| sudo apt install git -y | |
| #tilix | |
| sudo add-apt-repository ppa:webupd8team/terminix | |
| sudo apt-get update | |
| sudo apt install tilix -y | |
| sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh | |
| { echo ""; echo "if [ \$TILIX_ID ] || [ \$VTE_VERSION ]; then"; echo " source /etc/profile.d/vte.sh"; echo "fi"; } >> ~/.bashrc | |
| #obs-studio | |
| sudo add-apt-repository ppa:obsproject/obs-studio | |
| sudo apt-get update | |
| sudo apt install obs-studio -y | |
| #audacity | |
| sudo add-apt-repository ppa:audacity-team/daily | |
| sudo apt-get update | |
| sudo apt install audacity -y | |
| #keepassxc | |
| sudo add-apt-repository ppa:phoerious/keepassxc | |
| sudo apt update | |
| sudo apt install keepassxc -y | |
| #vmware | |
| #install .bundle file then, | |
| sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h | |
| sudo vmware-modconfig --console --install-all | |
| #software dev | |
| #install eclipse | |
| sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make | |
| sudo apt update | |
| sudo apt install ubuntu-make | |
| umake ide eclipse | |
| #platformio for arduino dev | |
| code --install-extension platformio.platformio-ide | |
| #install java jdk | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
| sudo apt-get install oracle-java9-installer -y | |
| sudo apt-get install oracle-java9-set-default -y | |
| #ceelang | |
| { echo ""; echo CC=clang; echo CXX=clang++; } >> ~/.bashrc | |
| source ~/.bashrc | |
| sudo apt install 'clang*5.0' -y | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-5.0 100 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-5.0 --slave /usr/bin/clang-check clang-check /usr/bin/clang-check-5.0 --slave /usr/bin/clang-query clang-query /usr/bin/clang-query-5.0 --slave /usr/bin/clang-rename clang-rename /usr/bin/clang-rename-5.0 --slave /usr/bin/clang-format clang-format /usr/bin/clang-format-5.0 --slave /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-5.0 | |
| if command -v code &> /dev/null; then | |
| code --install-extension xaver.clang-format | |
| fi |
Gnome Extensions
keep awake
https://github.com/jenspfahl/KeepAwake
Check shell for lesspipe
http://www.thegeekstuff.com/2009/04/linux-less-command-open-view-different-files-less-is-more/
#numix install
sudo apt-add-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-icon-theme-circle numix-gtk-theme
#install arc theme
sudo apt install arc-theme
#install paper theme
sudo add-apt-repository ppa:snwh/pulp
sudo apt-get update
sudo apt-get install paper-gtk-theme paper-cursor-theme paper-icon-theme
GNOME gTIle extension
install:
git clone https://github.com/gTile/gTile.git ~/.local/share/gnome-shell/extensions/gTile@vibou
Restart Gnome (only on X11, on Wayland you will have to log out and log back in)
Alt-F2
Enter a Command: r
clipboard indicator
keep awake!
night light slider
no spring
no title bar
sound and input device chooser
time++
topicons plus
workspace indicator
Gtile
#Brave Browser
curl https://s3-us-west-2.amazonaws.com/brave-apt/keys.asc | sudo apt-key add -
echo "deb [arch=amd64] https://s3-us-west-2.amazonaws.com/brave-apt lsb_release -sc main" | sudo tee -a /etc/apt/sources.list.d/brave-lsb_release -sc.list
#firefox/chrome gnome extensions manager connector
sudo apt install chrome-gnome-shell
#gnome night-light settings extension
https://github.com/TimurKiyivinski/gnome-shell-night-light-slider-extension
#qownnotes
sudo add-apt-repository ppa:pbek/qownnotes
sudo apt-get update
sudo apt-get install qownnotes
#ubuntu make - eclipse
sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake ide eclipse
https://codeload.github.com/<username>/<repository>/zip/<branch>
#download gist from terminal
curl -L https://gist.github.com/westonruter/ea038141e46e017d280b/download | tar -xvz --strip-components=1
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_09_07.html
#!/bin/bash
# This script can clean up files that were last accessed over 365 days ago.
USAGE="Usage: $0 dir1 dir2 dir3 ... dirN"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi
while (( "$#" )); do
if [[ $(ls "$1") == "" ]]; then
echo "Empty directory, nothing to be done."
else
find "$1" -type f -a -atime +365 -exec rm -i {} \;
fi
shift
done#!/bin/bash
# install various programs and configurations
USAGE="Usage: install.sh [PROGRAMS]"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi
sudo apt update
sudo apt dist-upgrade -y
while (( "$#" )); do
case "$1" in
etcher)
sudo add-apt-repository "deb https://dl.bintray.com/resin-io/debian stable etcher"
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 379CE192D401AB61
sudo apt-get update
sudo apt-get install -y etcher-electron
;;
exfat)
sudo apt-get install -y exfat-fuse exfat-utils
;;
extras)
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
sudo apt-get install -y ubuntu-restricted-extras
;;
git)
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update
sudo apt install -y git
;;
googlechrome)
wget -qO - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-add-repository 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'
sudo apt update
sudo apt install -y google-chrome-stable
;;
jdk)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get install -y oracle-java9-installer
sudo apt-get install -y oracle-java9-set-default
;;
keepass)
sudo add-apt-repository -y ppa:phoerious/keepassxc
sudo apt update
sudo apt install -y keepassxc
;;
platformio)
code --install-extension platformio.platformio-ide
;;
streamlink)
sudo add-apt-repository -y ppa:nilarimogard/webupd8
sudo apt update
sudo apt install -y streamlink
;;
sublime)
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-add-repository 'deb https://download.sublimetext.com/ apt/stable/'
sudo apt update
sudo apt install -y sublime-text
;;
ukuu)
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install -y ukuu
#xhost si:localuser:$USER
#sudo ukuu --install v4.13.10
;;
typora)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
sudo add-apt-repository 'deb https://typora.io linux/'
sudo apt update
sudo apt install -y typora
;;
variety)
sudo apt install -y variety
;;
#vlc)
# sudo add-apt-repository -y ppa:videolan/stable-daily
# sudo apt-get update
# sudo apt-get install -y vlc
# ;;
vmware)
sudo apt install -y build-essential linux-headers-$(uname -r) open-vm-tools-desktop dkms
chmod u+x VMware-Workstation-Full-14.1.0-7370693.x86_64.bundle
sudo ./VMware-Workstation-Full-14.1.0-7370693.x86_64.bundle
;;
vscode)
sudo add-apt-repository 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main'
sudo wget -qO - /dev/null https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo apt-get update
sudo apt-get install -y code
#extensions
code --install-extension Tyriar.vscode-terminal-here
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension EditorConfig.EditorConfig
code --install-extension donjayamanne.githistory
code --install-extension felipecaputo.git-project-manager
code --install-extension formulahendry.auto-close-tag
code --install-extension hoovercj.vscode-newfile-languagemode
code --install-extension ms-vscode.cpptools
code --install-extension patbenatar.advanced-new-file
code --install-extension ryu1kn.annotator
code --install-extension waderyan.gitblame
code --install-extension webfreak.debug
#themes
code --install-extension arc0re.theme-xcode-midnight
code --install-extension dracula-theme.theme-dracula
code --install-extension gerane.Theme-Batman
code --install-extension gerane.Theme-BatmanLight
code --install-extension gerane.Theme-Xcodedefault
code --install-extension leveluptutorials.theme-levelup
code --install-extension wesbos.theme-cobalt2
#icons
code --install-extension be5invis.vscode-icontheme-nomo-dark
code --install-extension krizzdewizz.vscode-icon-rotation
code --install-extension qinjia.seti-icons
code --install-extension robertohuertasm.vscode-icons
;;
yakuake)
sudo apt update
sudo apt install -y yakuake
;;
*)
echo "unknown argument: $1";;
esac
shift
done# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# This is a list of packages to be removed when the 'minimal' option is
# selected during installation.
# Note that the format is NOT the same as the usual seed format. This file is
# not processed by germinate - it is simply downloaded during image builds.
# Desktop apps
kamera
konversation
ktorrent
krdc
cantata
mpd
# KDE PIM
accountwizard
akonadi-backend-mysql
akonadi-server
akregator
kaddressbook
kdepim-addons
kdepim-runtime
kdepim-themeeditors
kleopatra
kmail
knotes
kontact
korganizer
ktnef
mbox-importer
pim-data-exporter
pim-sieve-editor
# Libreoffice
libreoffice-avmedia-backend-gstreamer
libreoffice-base
libreoffice-base-core
libreoffice-base-drivers
libreoffice-calc
libreoffice-common
libreoffice-core
libreoffice-draw
libreoffice-help-en-us
libreoffice-impress
libreoffice-java-common
libreoffice-kde
libreoffice-kde4
libreoffice-math
libreoffice-sdbc-hsqldb
libreoffice-style-breeze
libreoffice-style-galaxy
libreoffice-style-oxygen
libreoffice-style-tango
libreoffice-writer
python3-uno
uno-libs3
ure
# language packs
libreoffice-l10n-en-gb
libreoffice-l10n-es
libreoffice-l10n-zh-cn
libreoffice-l10n-zh-tw
libreoffice-l10n-pt
libreoffice-l10n-pt-br
libreoffice-l10n-de
libreoffice-l10n-fr
libreoffice-l10n-it
libreoffice-l10n-ru
libreoffice-l10n-en-za
libreoffice-help-en-gb
libreoffice-help-es
libreoffice-help-zh-cn
libreoffice-help-zh-tw
libreoffice-help-pt
libreoffice-help-pt-br
libreoffice-help-de
libreoffice-help-fr
libreoffice-help-it
libreoffice-help-ru
libreoffice-help-en-us
# residual deps/reverse-deps
ktorrent-data
konversation-data
mysql-client-core-5.7
mysql-server-core-5.7
kde-config-mailtransport
kf5-kdepim-apps-libs-data
kf5-messagelib-data
kio-ldap
kio-sieve
libkf5akonadiagentbase5
libkf5akonadicalendar5abi2
libkf5akonadicalendar-data
libkf5akonadicontact5abi1
libkf5akonadicontact-data
libkf5akonadicore5abi1
libkf5akonadicore-bin
libkf5akonadimime5
libkf5akonadimime-data
libkf5akonadinotes5
libkf5akonadinotes-data
libkf5akonadiprivate5
libkf5akonadisearch-bin
libkf5akonadisearchcore5
libkf5akonadisearch-data
libkf5akonadisearchdebug5
libkf5akonadisearchpim5
libkf5akonadisearch-plugins
libkf5akonadisearchxapian5
libkf5akonadiwidgets5
libkf5alarmcalendar5abi1
libkf5alarmcalendar-data
libkf5calendarcore5abi1
libkf5calendarsupport5abi1
libkf5calendarsupport-data
libkf5calendarutils5abi1
libkf5calendarutils-bin
libkf5calendarutils-data
libkf5contacteditor5
libkf5contacteditor-data
libkf5contacts5
libkf5contacts-data
libkf5eventviews5
libkf5eventviews-data
libkf5followupreminder5
libkf5grantleetheme5
libkf5grantleetheme-data
libkf5grantleetheme-plugins
libkf5gravatar5
libkf5gravatar-data
libkf5identitymanagement5abi1
libkf5identitymanagement-data
libkf5imap5
libkf5imap-data
libkf5incidenceeditor5abi2
libkf5incidenceeditor-bin
libkf5incidenceeditor-data
libkf5kaddressbookgrantlee5
libkf5kaddressbookimportexport5
libkf5kdepimdbusinterfaces5
libkf5kmanagesieve5
libkf5kontactinterface5
libkf5kontactinterface-data
libkf5ksieve5
libkf5ksieve-data
libkf5ksieveui5
libkf5ldap5
libkf5ldap-data
libkf5libkdepim5abi2
libkf5libkdepimakonadi5
libkf5libkdepim-data
libkf5libkdepim-plugins
libkf5libkleo5abi1
libkf5mailcommon5abi4
libkf5mailcommon-plugins
libkf5mailimporter5abi1
libkf5mailimporterakonadi5
libkf5mailimporter-data
libkf5mailtransport5abi2
libkf5mailtransportakonadi5
libkf5mailtransport-data
libkf5mbox5
libkf5messagecomposer5abi2
libkf5messagecore5abi2
libkf5messagelist5abi1
libkf5messageviewer5abi4
libkf5messageviewer-plugins
libkf5mime5abi2
libkf5mime-data
libkf5mimetreeparser5abi2
libkf5pimcommon5abi3
libkf5pimcommonakonadi5
libkf5pimcommon-plugins
libkf5pimtextedit5abi2
libkf5pimtextedit-data
libkf5sendlater5
libkf5syndication5
libkf5templateparser5abi2
libkf5tnef5
libkf5tnef-data
libkf5webengineviewer5abi3
libkpimgapicalendar5
libkpimgapicontacts5
libkpimgapitasks5
libkpimimportwizard5
libkpimkdav5
libkpimkdav-data
#!/bin/bash
# install various programs and configurations
USAGE="Usage: install.sh [PROGRAMS]"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 1
fi
sudo apt update
sudo apt dist-upgrade -y
sudo apt dos2unix -y
sudo apt curl -y
while (( "$#" )); do
case "$1" in
etcher)
sudo add-apt-repository "deb https://dl.bintray.com/resin-io/debian stable etcher"
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 379CE192D401AB61
sudo apt-get update
sudo apt-get install -y etcher-electron
;;
exfat)
sudo apt-get install -y exfat-fuse exfat-utils
;;
extras)
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
sudo apt-get install -y ubuntu-restricted-extras
;;
git)
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update
sudo apt install -y git
;;
googlechrome)
wget -qO - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo apt-add-repository 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'
sudo apt update
sudo apt install -y google-chrome-stable
;;
jdk)
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get install -y oracle-java9-installer
sudo apt-get install -y oracle-java9-set-default
;;
keepass)
sudo add-apt-repository -y ppa:phoerious/keepassxc
sudo apt update
sudo apt install -y keepassxc
;;
platformio)
code --install-extension platformio.platformio-ide
;;
streamlink)
sudo add-apt-repository -y ppa:nilarimogard/webupd8
sudo apt update
sudo apt install -y streamlink
;;
sublime)
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-add-repository 'deb https://download.sublimetext.com/ apt/stable/'
sudo apt update
sudo apt install -y sublime-text
;;
ukuu)
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install -y ukuu
xhost si:localuser:$USER
#sudo ukuu --install v4.13.10
;;
typora)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA300B7755AFCFAE
sudo add-apt-repository 'deb https://typora.io linux/'
sudo apt update
sudo apt install -y typora
;;
variety)
sudo apt install -y variety
;;
vmware)
sudo apt install -y build-essential linux-headers-$(uname -r) open-vm-tools-desktop dkms
chmod u+x VMware-Workstation-Full-14.1.0-7370693.x86_64.bundle
sudo ./VMware-Workstation-Full-14.1.0-7370693.x86_64.bundle
;;
vscode)
sudo add-apt-repository 'deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main'
sudo wget -qO - /dev/null https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo apt-get update
sudo apt-get install -y code
#extensions
code --install-extension Tyriar.vscode-terminal-here
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension EditorConfig.EditorConfig
code --install-extension donjayamanne.githistory
code --install-extension felipecaputo.git-project-manager
code --install-extension formulahendry.auto-close-tag
code --install-extension hoovercj.vscode-newfile-languagemode
code --install-extension ms-vscode.cpptools
code --install-extension patbenatar.advanced-new-file
code --install-extension ryu1kn.annotator
code --install-extension waderyan.gitblame
code --install-extension webfreak.debug
#themes
code --install-extension arc0re.theme-xcode-midnight
code --install-extension dracula-theme.theme-dracula
code --install-extension gerane.Theme-Batman
code --install-extension gerane.Theme-BatmanLight
code --install-extension gerane.Theme-Xcodedefault
code --install-extension leveluptutorials.theme-levelup
code --install-extension wesbos.theme-cobalt2
#icons
code --install-extension be5invis.vscode-icontheme-nomo-dark
code --install-extension krizzdewizz.vscode-icon-rotation
code --install-extension qinjia.seti-icons
code --install-extension robertohuertasm.vscode-icons
;;
yakuake)
sudo apt update
sudo apt install -y yakuake
;;
*)
echo "unknown argument: $1";;
esac
shift
done
AlanWalk.markdown-toc
alefragnani.Bookmarks
alefragnani.project-manager
AndrsDC.base16-themes
ban.spellright
bierner.emojisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
DavidAnson.vscode-markdownlint
dracula-theme.theme-dracula
eamodio.gitlens
EditorConfig.EditorConfig
Gimly81.matlab
James-Yu.latex-workshop
Rubymaniac.vscode-paste-and-indent
Shan.code-settings-sync
sidneys1.gitconfig
timonwong.shellcheck
wayou.vscode-todo-highlight
wesbos.theme-cobalt2
yzhang.markdown-all-in-one
zhuangtongfa.Material-theme
dakara.transformer
stkb.rewrap
annsk.alignment
florianloch.text-transform
jkjustjoshing.vscode-text-pastry
zh9528.file-size
stkb.rewrap
Tyriar.sort-lines
adamwalzer.string-converter
denisgerguri.hunspell-spellchecker
webdokkeren.joinlines
#setup python3,pip,venv
sudo apt install -y python3-venv python3-pip
#install s-tui
sudo apt install stress
sudo -H pip3 install s-tui
#or
sudo pip3 install s-tui