Files
dotfiles/setup_linux.sh
2020-04-22 08:04:39 -07:00

84 lines
1.5 KiB
Bash

#!/bin/bash
JAVA=true
WORK=false
PPAS=(
"kelleyk/emacs"
"git-core/ppa"
"fish-shell/release-3"
)
PACKAGES=(
gnome-tweak-tool
emacs26
vim
fish
ripgrep
fd-find
clang
git
fzf
ncdu
autojump
direnv
net-tools
tmux
python3-venv
)
if [ "$JAVA" == "true" ]; then
wget -O- https://apt.corretto.aws/corretto.key | sudo apt-key add -
sudo add-apt-repository -y 'deb https://apt.corretto.aws stable main'
PACKAGES+=(java-11-amazon-corretto-jdk)
fi
if [ "$WORK" == "true" ]; then
PACKAGES+=(
# VPN
"libpam0g:i386"
"libx11-6:i386"
"libstdc++6:i386"
"libstdc++5:i386"
libnss3-tools
openssl xterm
)
fi
for ppa in "${PPAS[@]}"
do
sudo add-apt-repository -y ppa:$ppa
done
sudo apt update
sudo apt install -y ${PACKAGES[@]}
# Alt-drag
gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>'
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
# Caps Lock -> Ctrl
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
# Use local time so as to not conflict with Windows
timedatectl set-local-rtc 1 --adjust-system-clock
# SSH setup
ssh-keygen -t rsa -f $HOME/.ssh/id_rsa -q -P ""
echo "Please add this key to GitHub, then press ENTER to continue."
echo ""
cat $HOME/.ssh/id_rsa.pub
echo ""
read
git clone git@github.com:tim-mccarthy/dotfiles.git .dotfiles
pushd .dotfiles
./deploy.sh
popd
sudo chsh -ls /usr/bin/fish $USER
git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install