Last active
November 17, 2023 20:55
-
-
Save joshfinley/b46f8625bdf4adeb6040 to your computer and use it in GitHub Desktop.
Since I frequently break my Linux installs by poking and prodding at different things, I've decided it's time to create a script that can take an out-of-the-box Ubuntu installation and set it up to my liking. Currently, if I run this script on a fresh install of ubuntu, it works, and the memory usage comes out at an average of 105 mb.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !WARNING! This script does extreme things to Unity. In fact it annihilates it. If you wish to | |
# run this script, please just give it a once over before you do so. This way, you'll understand | |
# what it is actually doing and may be prepared for the results. | |
# A script to setup Ubuntu the way I like it. | |
# Also its advisable to start this from a seperate tty. Ya know, because this script breaks things :) | |
# Update Repositories and install new versions of current packages | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Get some of the tools needed to do other things down the road | |
sudo apt-get install curl vim imagemagick alsa-utils lsb-release scrot htop flashplugin-installer | |
wget http://github.com/downloads/djmelik/archey/archey-0.2.8.deb | |
sudo dpkg -i archey-0.2.8.deb | |
# I don't like Unity. It's gotten better since I first used it a few years ago, but it still isnt | |
# exactly my cup of tea. So I'm gonna get rid of it. | |
# When tested on a VM the two lines below broke apt-get and possibly some other things. We'll Try something else | |
#sudo apt-get remove unity unity-asset-pool unity-control-center unity-control-center-signon \ | |
#unity-gtk-module-common unity-lens* unity-services unity-settings-daemon unity-webapps* unity-voice-service | |
# Heres why you might want to use a different tty | |
sudo service lightdm stop | |
sudo apt-get autoremove --purge unity unity-common unity-services unity-lens-\* unity-scope-\* unity-webapps-\* \ | |
gnome-control-center-unity hud libunity-core-6\* libunity-misc4 libunity-webapps\* appmenu-gtk appmenu-gtk3 appmenu-qt\* \ | |
overlay-scrollbar\* activity-log-manager-control-center firefox-globalmenu thunderbird-globalmenu libufe-xidgetter0 \ | |
xul-ext-unity xul-ext-webaccounts webaccounts-extension-common xul-ext-websites-integration gnome-control-center \ | |
gnome-session | |
# For some reason grub freaks out around here and asks for you to reselect the HDD it uses. needs investigation. | |
# Since were awesome and are using Awesome, and display managers are | |
# for the weak, well just get rid of that little login manager called lightdm. | |
sudo apt-get purge lightdm | |
# Install Awesome Window Manager latest | |
sudo add-apt-repository ppa:klaus-vormweg/awesome | |
sudo apt-get update | |
sudo apt-get install awesome | |
# setup basic directories for Awesome | |
cp -r /etc/xdg/awesome/ ~/.config/ | |
cp -r /usr/share/awesome/ ~/.config | |
# Install copycat-killer's repos | |
cd ~/.config/awesome | |
git clone https://github.com/copycat-killer/awesome-copycats.git | |
git clone https://github.com/copycat-killer/lain.git | |
cd ~/.config/awesome | |
mv awesome-copycats/* . | |
cp rc.lua.multicolor rc.lua | |
cd | |
cp -r ~/.config/awesome/awesome-copycats/themes ~/.config/awesome/ | |
# from here the user needs to choose which theme and rc.lua she wishes to use :) | |
# Thanks to copycat-killer @ https://github.com/copycat-killer for creating such amazing repos. | |
# bash is ok, but zsh is better :D | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
chsh -s `which zsh` | |
# Since we no longer have a login manager, and even with one things won't work correctly, we'll have to | |
# manipulate some things to get awesome to start at login | |
#cp /etc/skel/.bash_profile ~/.bash_profile | |
#cat > bash_profile-text-to-be-appended << EOF | |
#[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx | |
#EOF | |
#cat bash_profile-text-to-be-appended >> ~/.bash_profile | |
#rm bash_profile-text-to-be-appended | |
# now x needs to know to run Awesome WM when startx is issued | |
cd | |
cat > .xinitrc << EOF | |
if [ -d /etc/X11/xinit/xinitrc.d ] ; then | |
for f in /etc/X11/xinit/xinitrc.d/?* ; do | |
[ -x "$f" ] && . "$f" | |
done | |
unset f | |
fi | |
[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources | |
# twm & | |
# xclock -geometry 50x50-1+1 & | |
# xterm -geometry 80x50+494+51 & | |
# xterm -geometry 80x20+494-0 & | |
# exec xterm -geometry 80x66+0+0 -name login | |
xscreensaver & | |
xsetroot -cursor_name left_ptr & | |
exec awesome | |
EOF | |
# Now well make our x terminals less ugly | |
cd | |
cat > ~/.Xresources << EOF | |
! vim: set filetype=xdefaults : | |
*foreground: #D7D0C7 | |
*background: #151515 | |
!black | |
! *color0: #AF875F | |
! *color8: #AF875F | |
*color0: #101010 | |
*color8: #404040 | |
!red | |
*color1: #E84F4F | |
*color9: #D23D3D | |
!green | |
*color2: #B8D68C | |
*color10: #A0CF5D | |
!yellow | |
*color3: #E1AA5D | |
*color11: #F39D21 | |
!blue | |
*color4: #7DC1CF | |
*color12: #4E9FB1 | |
!magenta | |
*color5: #9B64FB | |
*color13: #8542FF | |
!cyan | |
*color6: #6D878D | |
*color14: #42717B | |
!white | |
*color7: #dddddd | |
*color15: #dddddd | |
URxvt*borderColor: #151515 | |
URxvt*colorBD: #ffffff | |
URxvt*cursorColor: #ff8939 | |
URxvt*cursorColor2: #151515 | |
EOF | |
wget -q -O - https://apt.mopidy.com/mopidy.gpg | sudo apt-key add - | |
sudo apt-get install ncmpcpp | |
sudo cat > ~/etc/apt/sources.list.d/mopidy.list << EOF | |
# Mopidy APT archive | |
deb http://apt.mopidy.com/ stable main contrib non-free | |
deb-src http://apt.mopidy.com/ stable main contrib non-free | |
EOF | |
sudo apt-get update | |
sudo apt-get install mopidy irssi | |
# we could either reboot or do this the hard way. I elect for just rebooting. | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment