#!/usr/bin/env sh greeter() { clear cat </etc/pacman.conf < /etc/udev/rules.d/99-udisks2.rules && echo 'D /media 0755 root root 0 -' > /etc/tmpfiles.d/media.conf" } copy_configs() { # .config dir cd ~/Dotfiles/botfiles/.config || exit cp -r * ~/.config/ if [ "$HOSTNAME" = "pc" ]; then echo "Use pc config..." mv ~/.config/polybar/config.pc ~/.config/polybar/config mv ~/.config/sxhkd/sxhkdrc.pc ~/.config/sxhkd/sxhkdrc elif [ "$HOSTNAME" = "laptop" ]; then echo "Use laptop config..." mv ~/.config/polybar/config.laptop ~/.config/polybar/config mv ~/.config/sxhkd/sxhkdrc.laptop ~/.config/sxhkd/sxhkdrc fi rm -rf ~/.config/sxhkd/sxhkdrc.* rm -rf ~/.config/polybar/config.* # Telegram bindings cd ~/Dotfiles/botfiles || exit mkdir -p ~/.local/share/TelegramDesktop/tdata/ cp shortcuts-custom.json ~/.local/share/TelegramDesktop/tdata # Configs in home dir cp .zshrc .bash_profile .bashrc .profile .shellrc .zprofile .Xresources .xinitrc ~/ # Scripts cp -r .scripts/* ~/.scripts cd ~/.scripts/ || exit rm -rf rofi-keepassxc git clone https://github.com/samedamci/rofi-keepassxc rm -rf mpdmenu git clone https://github.com/samedamci/mpdmenu rm -rf rofi-todo git clone https://github.com/samedamci/rofi-todo rm -rf kaomoji-rofi git clone https://gitlab.com/ceda_ei/kaomoji-rofi rm -rf blaze git clone https://github.com/Cherrry9/blaze chmod +x ~/.scripts/* # Zsh plugins cd ~/.config/zsh || exit rm -rf plugins mkdir plugins cd plugins || exit git clone https://github.com/zsh-users/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-autosuggestions } sudo -v greeter printf "\nDo you want to install packages from repo? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing repo packages"; install_repo_packages &>$LOG_DIR/install_repo_packages.log fi greeter printf "\nDo you want to install packages from AUR? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing AUR packages"; install_aur_packages &>$LOG_DIR/install_aur_packages.log fi greeter printf "\nDo you want to install packages from PyPI? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing PyPI packages"; install_pypi_packages &>$LOG_DIR/install_pypi_packages.log fi greeter printf "\nDo you want to install packages from NPM? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing NPM packages"; install_npm_packages &>$LOG_DIR/install_npm_packages.log fi greeter printf "\nDo you want to build and install st fork? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing st..."; install_st &>$LOG_DIR/install_st.log fi greeter printf "\nDo you want to build and install dmenu fork? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Installing dmenu..."; install_dmenu &>/$LOG_DIR/install_dmenu.log fi greeter printf "\nDo you want to configure pacman? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Configuring pacman..."; configure_pacman fi greeter printf "\nDo you want to configure udiskie? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then echo "Configuring udiskie..."; configure_udiskie fi greeter printf "\nDo you want to copy configs? (y/n): "; read CHOICE if [ "$CHOICE" = "Y" ] || [ "$CHOICE" = "y" ]; then printf "Moving configs..." copy_configs &>$LOG_DIR/copy_configs.log printf "\n" chsh -s /usr/bin/zsh fi clear