diff --git a/dotman b/dotman index 1067279..7583618 100755 --- a/dotman +++ b/dotman @@ -1,6 +1,9 @@ #!/usr/bin/env sh greeter() { + + clear + cat </etc/pacman.conf </etc/pacman.conf < /etc/udev/rules.d/99-udisks2.rules && echo 'D /media 0755 root root 0 -' > /etc/tmpfiles.d/media.conf" + +} + copy_configs() { - cd ~/Dotfiles/botfiles/.config + + # .config dir + cd ~/Dotfiles/botfiles/.config || exit cp -r * ~/.config/ @@ -149,14 +190,18 @@ copy_configs() { rm -rf ~/.config/sxhkd/sxhkdrc.* rm -rf ~/.config/polybar/config.* - cd ~/Dotfiles/botfiles + # 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 ~/ - - cp -r .scripts ~/scripts - cd ~/.scripts/ + + # Scripts + cp -r .scripts/* ~/scripts + cd ~/.scripts/ || exit rm -rf rofi-keepassxc git clone https://github.com/samedamci/rofi-keepassxc rm -rf mpdmenu @@ -164,47 +209,65 @@ copy_configs() { rm -rf rofi-todo git clone https://github.com/samedamci/rofi-todo chmod +x ~/.scripts/* - - cd ~/.config/zsh + + # Zsh plugins + cd ~/.config/zsh || exit rm -rf plugins mkdir plugins - cd plugins + cd plugins || exit git clone https://github.com/zsh-users/zsh-syntax-highlighting git clone https://github.com/zsh-users/zsh-autosuggestions - sudo mkdir /media } sudo -v -clear greeter -printf "\nDo you want to install yay? (Y/n): "; read CHOICE -if [ "$CHOICE" = "Y" ]; then echo "Installing yay..." && install_yay &>$LOG_DIR/install_yay.log; fi -clear + +printf "\nDo you want to install packages from repo? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing repo packages"; install_repo_packages &>$LOG_DIR/install_repo_packages.log + greeter -printf "\nDo you want to install packages? (Y/n): "; read CHOICE -if [ "$CHOICE" = "Y" ]; then echo "Installing packages..." && install_packages &>$LOG_DIR/install_packages.log; fi -clear + +printf "\nDo you want to install packages from AUR? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing AUR packages"; install_aur_packages &>$LOG_DIR/install_aur_packages.log + greeter -printf "\nDo you want to compile nad install st? (Y/n): "; read CHOICE -if [ "$CHOICE" = "Y" ]; then echo "Compiling and installing st..." && install_st &>$LOG_DIR/install_st.log; fi -printf "\nDo you want to compile nad install dmenu? (Y/n): "; read CHOICE -if [ "$CHOICE" = "Y" ]; then echo "Compiling and installing dmenu..." && install_dmenu &>$LOG_DIR/install_dmenu.log; fi -printf "\nDo you want to compile nad install tabbed? (Y/n): "; read CHOICE -if [ "$CHOICE" = "Y" ]; then echo "Compiling and installing tabbed..." && install_tabbed &>$LOG_DIR/install_tabbed.log; fi -clear + +printf "\nDo you want to install packages from PyPI? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing PyPI packages"; install_pypi_packages &>$LOG_DIR/install_pypi_packages.log + greeter + +printf "\nDo you want to install packages from NPM? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing NPM packages"; install_npm_packages &>$LOG_DIR/install_npm_packages.log + +greeter + +printf "\n Do you want to build and install st fork? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing st..."; install_st &>$LOG_DIR/install_st.log + +greeter + +printf "\nDo you want to build and install dmenu fork? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Installing dmenu..."; install_dmenu &>/$LOG_DIR/install_dmenu.log + +greeter + +printf "\nDo you want to configure pacman? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Configuring pacman..."; configure_pacman &>/$LOG_DIR/configure_pacman.log + +greeter + +printf "\nDo you want to configure udiskie? (y/n): "; read CHOICE +[[ "$CHOICE" == "y" ]] && echo "Configuring udiskie..."; configure_udiskie &>/$LOG_DIR/configure_udiskie.log + printf "\nDo you want to copy configs? (Y/n): "; read CHOICE if [ "$CHOICE" = "Y" ]; then - printf "Moving configs...\n" + printf "Moving configs..." copy_configs &>$LOG_DIR/copy_configs.log printf "\n" chsh -s /usr/bin/zsh - printf "\nConfiguring udiskie.\n" - su root -c "echo 'ENV{ID_FS_USAGE}==\"filesystem|other|crypto\", ENV{UDISKS_FILESYSTEM_SHARED}=\"1\"' > /etc/udev/rules.d/99-udisks2.rules && echo 'D /media 0755 root root 0 -' > /etc/tmpfiles.d/media.conf" - printf "\nConfiguring pacman.\n" - config_pacman fi + clear -greeter