helm/os/arch/install
2016-11-04 01:30:41 +01:00

113 lines
2.6 KiB
Bash
Executable file

#!/bin/bash
PWD=$(dirname $0)
pacman="sudo pacman --needed --noconfirm -S"
pacaur="sudo pacaur --needed --noconfirm -s"
## Bootstrap
$pacman git
if ! command -v pacaur >/dev/null
then
pushd $(mktemp -d)
git clone https://aur.archlinux.org/pacaur.git && cd pacaur && makepkg -sri
TEMP=$(pwd)
popd
rm -rf "$TEMP"
fi
########################################
#
# GUI+Desktop
#
########################################
$pacman xorg-init xorg-server xorg-xandr xorg-xrdb xorg-xmodmap \
xorg-fonts-75dpi xorg-xset xorg-xfd xdotool
$pacaur xdo-git
# Fonts
$pacman ttf-dejavu ttf-inconsolata ttf-liberation ttf-ubuntu-font-family terminus-font
# Taskbar
$pacaur lemonbar lemonbar-xft-git siji-git clock sutils-git
# Window manager
$pacman lightdm lightdm-webkit2-greeter bspwm sxhkd compton
sudo sed -i 's/^#\?\(user-session=\).*/\1bspwm/;
s/^#\?\(greeter-allow-guest=\).*/\1false/;
s/^#\?\(greeter-session=\).*/\1lightdm-webkit2-greeter/' \
/etc/lightdm/lightdm.conf
sudo sed -i 's/^#\?\(webkit-theme = \).*/\1vnought/' \
/etc/lightdm/lightdm-webkit2-greeter.conf
[ -d /usr/share/lightdm-webkit/themes/vnought ] || \
sudo git clone https://github.com/hlissner/lightdm-webkit2-vnought /usr/share/lightdm-webkit/themes/vnought
########################################
#
# System/Shell
#
########################################
# Essentials
$pacman wget curl make tmux rsync tree the_silver_searcher bc xsel
# Install hooks
hookdest=/etc/pacman.d/hooks
for hook in $PWD/pacman.d/hooks/*.hook
do
[ -f $hookdest/$(basename "$hook") ] || ln -svf $hook $hookdest/
done
# Install crontab
$pacman cronie
[ -f $PWD/crontab ] && crontab $PWD/crontab
# Utilities
$pacman feh youtube-dl rofi mpd mpc ncmpcpp redshift
$pacaur git-crypt fasd
########################################
#
# Networking
#
########################################
ETH=$(basename $(echo /sys/class/net/enp*))
WLP=$(basename $(echo /sys/class/net/wlp*))
$pacman dhcpcd netctl
# Speed up connections on boot
if ! grep "^noarp$" /etc/dhcpcd.conf
then
echo "\nnoarp" | sudo tee -a /etc/dhcpcd.conf
fi
if [[ $ETH ]]; then
$pacman ifplug
sudo systemctl enable netctl-ifplugd@$ETH.service
sudo systemctl start netctl-ifplugd@$ETH.service
fi
if [[ $WLP ]]; then
$pacman wpa_supplicant wpa_actiond dialog
sudo wifi-menu
fi
########################################
#
# Apps & Customization
#
########################################
# Applications
$pacman rxvt-unicode firefox obs-studio chromium
# GTK theme
[[ -d /usr/share/themes/Arc-Dark ]] || $pacaur gtk-theme-arc