sisyphus/arch/pkg/tdpeuter/desktop.install

81 lines
1.9 KiB
Text
Raw Normal View History

2022-10-26 12:49:01 +02:00
post_install() {
2022-10-26 13:48:16 +02:00
# Initiate the stow repo
2022-10-26 20:59:47 +02:00
>&2 echo "Cloning stow git repository"
2022-10-26 14:54:09 +02:00
git clone --depth 1 --progress https://git.depeuter.tk/tdpeuter/arch-pkgs /usr/share/tdpeuter/arch-pkgs
# Installing yay
>&2 echo "Installing yay"
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
2022-10-27 21:42:00 +02:00
su -c "makepkg -si --asdeps --noconfirm" - tdpeuter
2022-10-26 15:23:51 +02:00
2022-10-26 12:49:01 +02:00
post_upgrade
}
post_upgrade() {
2022-10-27 10:09:21 +02:00
install_apps
2022-10-27 23:29:56 +02:00
code --install-extension ms-vscode.cpptools
2022-10-26 21:42:32 +02:00
install_fonts
2022-10-26 22:04:41 +02:00
do_stow
2022-10-26 12:49:01 +02:00
}
2022-10-26 13:48:16 +02:00
2022-10-26 15:26:44 +02:00
pre_remove() {
rm -rf /usr/share/tdpeuter/arch-pkgs
}
2022-10-27 10:09:21 +02:00
install_apps() {
rm /var/lib/pacman/db.lck
# Desktop
pkgs=" sway-git swaylock-effects-git "
# Socials & entertainment
pkgs+=" betterbird-bin hamsket-bin jellyfin-media-player spotify "
pkgs+=" zoom "
# Coding
2022-10-27 23:20:54 +02:00
pkgs+=" intellij-idea-ultimate-edition intellij-idea-ultimate-edition-jre "
pkgs+=" jetbrains-fleet pycharm-professional rstudio-desktop-bin "
pkgs+=" visual-studio-code-bin "
# Tools
pkgs+=" google-chrome zenith "
2022-10-27 21:30:27 +02:00
# Skip these
options="--sudoflags -A --answerclean None --answerdiff None "
# Do not wait
options+="--noconfirm "
2022-10-27 21:30:27 +02:00
su -c "export SUDO_ASKPASS=/usr/lib/ssh/x11-ssh-askpass && yay ${options} -S ${pkgs}" - tdpeuter
2022-10-26 21:42:32 +02:00
}
install_fonts() {
2022-10-26 22:01:49 +02:00
mkdir -p /usr/local/share/fonts/letter
2022-10-26 21:42:32 +02:00
>&2 echo "Installing letter (font)"
2022-10-26 22:01:49 +02:00
git clone --depth 1 --progress https://github.com/tdpeuter/letter.git
2022-10-26 21:42:32 +02:00
cd letter
2022-10-26 22:01:49 +02:00
cp ttf/* /usr/local/share/fonts/letter/
cp ttf-unhinted/* /usr/local/share/fonts/letter/
cp woff2/* /usr/local/share/fonts/letter/
2022-10-26 21:42:32 +02:00
cd
2022-10-26 19:53:11 +02:00
}
2022-10-26 22:01:49 +02:00
2022-10-26 22:04:41 +02:00
do_stow() {
2022-10-26 22:01:49 +02:00
>&2 echo "Moving to dotfile directory"
cd /usr/share/tdpeuter/arch-pkgs/
>&2 echo "Pulling stow git repository"
git pull
user=$(who | cut -f1 -d' ')
packages=$(ls ./stow)
>&2 echo "Stowing all packages"
stow -d ./stow -t "/home/${user}" ${packages}
}
2022-10-27 00:39:24 +02:00