Last active
March 26, 2017 17:38
-
-
Save dideler/6605525 to your computer and use it in GitHub Desktop.
A basic script to configure my development environment on a new Ubuntu machine.
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 | |
# | |
# A basic script to configure a new personal machine and my development environment. | |
# Install: wget -q https://gist.github.com/dideler/6605525/raw/a5e83789254ee4c01937905a7398300386d2dd30/setup.sh -O - | sh | |
# | |
# Note that some stuff I use, such as fish, are typically installed via binaries. | |
# | |
# Don't forget to enable virtual desktops and two finger reverse scrolling! | |
# http://askubuntu.com/questions/260510/how-do-i-turn-on-workspaces-why-do-i-only-have-one-workspace-in-13-04 | |
# http://askubuntu.com/questions/91426/reverse-two-finger-scroll-direction | |
# Remove Desktop name from Unity panel. Will take effect after you log out and back in. | |
echo -e 'msgid "Ubuntu Desktop"\nmsgstr " "' > /tmp/remove_desktop_name.po | |
pushd /usr/share/locale/en/LC_MESSAGES | |
sudo msgfmt -o unity.mo /tmp/remove_desktop_name.po | |
popd | |
# Set focus to follow mouse (instead of click) | |
# http://askubuntu.com/questions/64605/how-do-i-set-focus-follows-mouse | |
gsettings set org.gnome.desktop.wm.preferences focus-mode 'sloppy' | |
gsettings set org.gnome.desktop.wm.preferences auto-raise-delay 500 | |
gsettings set org.gnome.desktop.wm.preferences raise-on-click true | |
# Add repositories | |
sudo add-apt-repository ppa:nesthib/weechat | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-add-repository ppa:caffeine-developers/ppa | |
sudo apt-add-repository ppa:fish-shell/release-2 | |
sudo apt-get update | |
sudo apt-get install -y build-essential git curl python-pip xclip vlc \ | |
ubuntu-restricted-extras unity-tweak-tool \ | |
python-software-properties python g++ make automake \ | |
aptitude weechat nodejs tree caffeine fish | |
# Installing python-pip will also install python-setuptools. | |
# ubuntu-restricted-extras is to play non-free media formats. | |
# Configure weechat using /set command (no args shows all options) or edit ~/.weechat/*.conf files. | |
# In weechat: | |
# /script install notify.py | |
# /script autoload notify.py | |
# /set irc.look.smart_filter on | |
# /filter add irc_smart * irc_smart_filter * | |
sudo chown -R whoami ~/.npm # Reclaim ownership to avoid sudoing every time. | |
# Install libdvdcss to play DVDs (TODO: automatically detect if DVD-drive exists) | |
# sudo /usr/share/doc/libdvdread4/install-css.sh | |
# Install geturl | |
sudo curl https://raw.github.com/uams/geturl/master/geturl -o /usr/local/bin/geturl | |
sudo chmod +x /usr/local/bin/geturl | |
# Remove junk | |
sudo apt-get autoremove unity-lens-shopping unity-scope-video-remote unity-scope-musicstores empathy | |
# Install Python packages | |
sudo pip install --upgrade pip setuptools virtualenv virtualenvwrapper dotfiles | |
# Some handy packages that shouldn't be installed system-wide: sphinx pep8 httpie colorama requests | |
# Install Heroku toolbelt | |
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh | |
heroku login # Prompts email and password | |
# Install dotfiles | |
cd $HOME | |
mkdir github && cd github | |
git clone https://github.com/dideler/dotfiles | |
dotfiles --sync | |
# TODO: install redshift | |
# Create todo script | |
sudo echo -e '#!/bin/sh\nset -e\ntouch ~/Desktop/"$*"' > /usr/local/bin/todo | |
sudo chmod +x /usr/local/bin/todo | |
echo 'Rebooting...' | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should I install packages that are available from non-system package managers (e.g. npm, gem, pip) here? Might be better to do in something like a fish script...