Skip to content

Instantly share code, notes, and snippets.

@mnemocron
Created December 23, 2017 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnemocron/8163fa218b568f7575c0d3a78dfa9e67 to your computer and use it in GitHub Desktop.
Save mnemocron/8163fa218b568f7575c0d3a78dfa9e67 to your computer and use it in GitHub Desktop.
#!/bin/bash
# @title : debian-setup.sh
# @author : Simon Burkhardt - simonmartin.ch
# @date : 2017-12-23
# @version : 1.1.0
# @copyright : CC0 - https://creativecommons.org/publicdomain/zero/1.0
# @brief : Install beautiful stuff, uninstalls useless gnome bloatware
# @details : none
# @date : 10.04.2017
# Reset color
c_RS="\e[0m"
# Basic Colors
c_BLACK="\e[0;30m"
c_RED="\e[0;31m"
c_GREEN="\e[0;32m"
c_YELLOW="\e[0;33m"
c_BLUE="\e[0;34m"
c_PURPLE="\e[0;35m"
c_CYAN="\e[0;36m"
c_WHITE="\e[0;37m"
u_name=$(whoami)
if [ "$EUID" -ne 0 ]; then
echo -e "[ \e[0;31mError$c_RS ] : Please run as root!";
exit;
fi
read -p "Please enter your username " u_name
if [ ! -d "/home/$u_name/Downloads" ]; then
echo -e "[ \e[0;31mError$c_RS ] : ";
cd "/home/$u_name/Downloads";
exit;
fi
# sudo apt-get install software-properties-common
echo "";
echo -e "[ Info ] : System update (apt-get update & upgrade) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get update
apt-get upgrade
fi
echo "";
echo -e "[ Info ] : Removing useless stuff (Gnome Games) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get remove -y gnome-chess;
apt-get remove -y aisleriot;
apt-get remove -y five-or-more;
apt-get remove -y aisleriot;
apt-get remove -y hitori;
apt-get remove -y iagno;
apt-get remove -y imagemagick;
apt-get remove -y gnome-mines;
apt-get remove -y gnome-nibbles;
apt-get remove -y gnome-klotski;
apt-get remove -y lightsoff;
apt-get remove -y gnome-mahjongg;
apt-get remove -y xboard;
apt-get remove -y gnome-tetravex;
apt-get remove -y swell foop;
apt-get remove -y tali;
apt-get remove -y gnome-u;
apt-get remove -y quadrapassel;
apt-get remove -y gnome-robots;
apt-get remove -y gnome-sudoku;
fi
echo "";
echo -e "[ Info ] : Installing git $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get install -y git
fi
echo "";
echo -e "[ Info ] : Installing Gnome Arc-Theme $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
rm -rf /usr/share/themes/{Arc,Arc-Darker,Arc-Dark};
rm -rf ~/.local/share/themes/{Arc,Arc-Darker,Arc-Dark};
echo "";rm -rf ~/.themes/{Arc,Arc-Darker,Arc-Dark};
echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0/ /' >> /etc/apt/sources.list.d/arc-theme.list ;
apt-get update;
apt-get install -y --force-yes arc-theme;
sleep 1;
gsettings set org.gnome.desktop.interface gtk-theme "Arc";
gsettings set org.gnome.desktop.wm.preferences theme "Arc";
fi
echo "";
echo -e "[ Info ] : Installing Afflatus GTK-Theme $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /usr/bin/themes
git clone https://github.com/nivekxyz/afflatus.git
sleep 1;
gsettings set org.gnome.desktop.interface gtk-theme "Afflatus";
gsettings set org.gnome.desktop.wm.preferences theme "Afflatus";
fi
echo "";
echo -e "[ Info ] : Installing Paper Icon Theme $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
git clone https://github.com/snwh/paper-icon-theme.git;
cp -rRp paper-icon-theme/Paper /usr/share/icons;
rm -rf paper-icon-theme;
sleep 1;
gsettings set org.gnome.desktop.interface icon-theme "Paper";
fi
echo "";
echo -e "[ Info ] : Installing Numix Icon Themes and Numix GTK Theme $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
git clone https://github.com/cldx/numix-gtk-theme
mv numix-gtk-theme /usr/share/themes;
# git clone https://github.com/numixproject/numix-cursor-theme
# cp -rRp numix-cursor-theme/Numix /usr/share/themes
# cp -rRp numix-cursor-theme/Numix-Light /usr/share/themes # goes where ?
git clone https://github.com/numixproject/numix-icon-theme
git clone https://github.com/numixproject/numix-icon-theme-square
git clone https://github.com/numixproject/numix-icon-theme-circle
cp -rRp numix-icon-theme/Numix /usr/share/icons;
cp -rRp numix-icon-theme/Numix-Light /usr/share/icons;
cp -rRp numix-icon-theme-square/Numix-Square /usr/share/icons;
cp -rRp numix-icon-theme-square/Numix-Square-Light /usr/share/icons;
cp -rRp numix-icon-theme-circle/Numix-Circle /usr/share/icons;
cp -rRp numix-icon-theme-circle/Numix-Circle-Light /usr/share/icons;
rm -rf numix-icon-theme
rm -rf numix-icon-theme-square
rm -rf numix-icon-theme-circle
sleep 1;
gsettings set org.gnome.desktop.interface icon-theme "Numix-Circle-Light";
gsettings set org.gnome.desktop.interface gtk-theme "Numix-gtk-theme";
gsettings set org.gnome.desktop.wm.preferences theme "Numix-gtk-theme";
fi
echo "";
echo -e "[ Info ] : Installing Iris GTK Theme $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
git clone https://github.com/xyl0n/iris.git
mv iris /usr/share/themes
sleep 1;
gsettings set org.gnome.desktop.interface gtk-theme "Iris";
gsettings set org.gnome.desktop.wm.preferences theme "Iris";
fi
echo "";
echo -e "[ Info ] : Downloading Wallpapers from Unslpash $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Pictures
if [ ! -d "Unsplash" ]; then
mkdir Unsplash
chmod $u_name:$u_name Unsplash
fi;
cd Unsplash;
wget https://hd.unsplash.com/photo-1443996104801-80c82e789b18;
wget https://hd.unsplash.com/photo-1429516387459-9891b7b96c78;
wget https://hd.unsplash.com/photo-1445452916036-9022dfd33aa8;
wget https://hd.unsplash.com/photo-1444065707204-12decac917e8;
wget https://hd.unsplash.com/photo-1454111186746-109ec09571b2;
cd ..
chmod $u_name:$u_name Unsplash
chmod $u_name:$u_name Unsplash/*
gsettings set org.gnome.desktop.background picture-uri file:///home/$u_name/Pictures/Unsplash/photo-1445452916036-9022dfd33aa8;
fi
echo "";
echo -e "[ Info ] : Installing silly stuff (archey / screenfetch / cowsay / sl / mplayer / caca / lolcat / figlet) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
apt-get install -y lsb-release scrot;
wget http://github.com/downloads/djmelik/archey/archey-0.2.8.deb;
dpkg -i archey-0.2.8.deb;
rm -rf archey-0.2.8.deb;
archey;
apt-get install -y screenfetch;
screenfetch;
apt-get install -y sl;
sl;
apt-get install -y cowsay;
cowsay "Hello, World!";
apt-get install -y mplayer;
apt-get install -y caca-utils;
apt-get install -y lolcat figlet;
figlet "Hello, World!" | lolcat
fi
echo "";
echo -e "[ Info ] : Installing Steam $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
wget http://media.steampowered.com/client/installer/steam.deb;
dpkg -i steam.deb;
dpkg --add-architecture i386;
apt-get update;
apt-get install -y libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386;
rm -rf steam.deb;
fi
echo "";
echo -e "[ Info ] : Installing Shutter (screenshot tool) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get install -y shutter
fi
echo "";
echo -e "[ Info ] : Installing VLC (media player) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get install -y vlc
fi
echo "";
echo -e "[ Info ] : Installing gThumb (photo editor) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
apt-get install -y gthumb
fi
echo "";
echo -e "[ Info ] : Installing Discord (chat app) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads
wget https://discordapp.com/api/download?platform=linux&format=deb -O discord.deb
dpkg -i discord.deb
rm discord.deb
fi
read -p "" ANSW
echo "";
echo -e "[ Info ] : Installing Telegram (chat app) $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
wget https://telegram.org/dl/desktop/linux -O tsetup.tar.xz
tar xvfJ tsetup.tar.xz
rm tsetup
fi
read -p "" ANSW
echo "";
echo -e "[ Info ] : Installing Sublime Text 3 $c_RS"
read -p "Do you want to continue [Y/n] " ANSW
if [ "$ANSW" = "y" ] | [ "$ANSW" = "Y" ] | [ "$ANSW" = "" ]; then
cd /home/$u_name/Downloads;
wget https://download.sublimetext.com/sublime-text_build-3114_amd64.deb;
dpkg -i sublime-text_build-3126_amd64.deb;
rm -rf sublime-text_build-3114_amd64.deb;
echo -e "$Green \nRun the following script in Sublime Text 3:";
echo -e "$Yellow \nimport urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by) $Color_Off";
echo -e "$Green \nFor the flatland theme, visit:\nhttps://github.com/thinkpixellab/flatland";
echo -e '$Green "theme": "Flatland Dark.sublime-theme",';
echo -e 'c_PURPLE // square file tabs instead of rounded corners';
echo -e 'c_PURPLE "flatland_square_tabs": true,';
echo -e 'c_PURPLE // Monokai color scheme (SublimeTexts default) with Flatland background color';
echo -e 'c_PURPLE "color_scheme": "Packages/Theme - Flatland/Flatland Monokai.tmTheme",';
echo -e 'c_PURPLE Ability to change row height of sidebar tree';
echo -e 'c_PURPLE Options: xsmall, small, medium, large, xlarge';
echo -e 'c_PURPLE "flatland_sidebar_tree_xsmall" : true,';
echo -e 'c_PURPLE "color_scheme": "Packages/One Dark Color Scheme/One Dark.tmTheme",';
fi
read -p "" ANSW
echo -e "[ \e[0;32mOK$c_RS ] : done setting up your Debian"
echo -e "for a colored promt: $c_RS"
echo -e "uncomment force_color_promt=yes"
echo -e "in ~/.bashrc"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment