helm/base/arch-desktop/_init

64 lines
1.7 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env zsh
source ${0:A:h}/../../deploy
install() {
if ! nc -z 8.8.8.8 53 >/dev/null 2>&1; then
>&2 echo "No internet connection"
return 1
elif ! sudo pacman -Syu --noconfirm; then
>&2 echo "Could not update pacman"
return 2
elif ! _is_callable yay; then
>&2 echo "Could not find pacaur"
return 3
fi
yay --needed --noconfirm -S \
xorg-server xorg-xrandr xorg-xinit xorg-xlsfonts xorg-xfd xdotool \
lightdm lightdm-mini-greeter \
bspwm sxhkd compton dunst xcb-proto polybar libnotify \
rvxt-unicode rvxt-unicode-terminfo \
slop feh maim ffmpeg zbar \
keybase-bin pass pass-otp \
neofetch glances inxi dfc youtube-dl \
ttf-fira-{mono,sans} ttf-font-awesome tamsyn-font siji-git \
arc-gtk-theme qt5-styleplugins \
evince
xdg-mime default evince.desktop application/pdf
# install crontab
crontab ./crontab
# raise inotify limit
sudo tee -a /etc/sysctl.d/99-sysctl.conf <<<"fs.inotify.max_user_watches=524288"
# set up lightdm + minigreeter
sudo systemctl enable lightdm
sudo sed -i \
-e "s@^#?\(greeter-session=\).+@\1lightdm-mini-greeter@" \
-e "s@^#?\(user-session=\).+@\1bspwm@" \
/etc/lightdm/lightdm.conf
sudo sed -i \
-e "s@^\(user = \).+@\1${USER}@" \
-e "s@^\(show-password-label = \).+@\1false@" \
-e "s@^\(background-color = \).+@\1\"#000000\"@;" \
/etc/lightdm/lightdm-mini-greeter.conf
}
# update() {}
link() {
mklink xprofile ~/.xprofile
mklink config/* $XDG_CONFIG_HOME/
mklink fonts/* $XDG_DATA_HOME/fonts/
mklink -s etc/pacman/*.hook /etc/pacman.d/hooks/
}
clean() {
rm -fv $XDG_DATA_HOME/fonts/*(@N)
sudo rm -fv /etc/pacman.d/hooks/*(@N)
}
init "$@"