#!/bin/bash

sudo pacman -Suuy
sudo pacman -S vim mpd mpc ncmpcpp htop brightnessctl xwallpaper man dnsutils adobe-source-han-sans-jp-fonts bash-completion pcmanfm mpv maim keepassxc qbittorrent terminus-font firefox xclip wireguard-tools wget p7zip unzip zip rsync neofetch lxappearance gcc cmake gdb nsxiv git alacritty tmux neovim telegram-desktop fzf

sudo cp -f ~/.config/lightdm/lightdm-gtk-greeter.conf /etc/lightdm/
sudo cp -f ~/.config/pacman/* /etc/
sudo cp -f ~/.config/profile/profile /etc/
mkdir -p ~/.local/share/
mkdir -p ~/.local/share/sqlite3/
mkdir -p ~/.local/share/i3status/
mkdir -p ~/.local/share/ffmpeg/
echo ' put some reminder here man ' > ~/.local/share/i3status/reminder
echo ' here some music will play ' > ~/.local/share/i3status/now-playing
mkdir -p ~/Code/

curl -fLo ~/.config/vim/autoload/plug.vim --create-dirs     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

systemctl --user enable mpd.service
systemctl --user start mpd.service

echo " "
echo " "
echo "Now installing yay!"
echo " "
echo " "

cd /opt
sudo git clone https://aur.archlinux.org/yay-git.git
sudo chown -R "$(id -un)":"$(id -un)" ./yay-git
cd yay-git
makepkg -si
yay -Suy
yay -S unrar i3exit

echo " "
echo " "
echo "Now installing keyboard layout!"
echo " "
echo " "

localectl --no-convert set-x11-keymap us,ru "" "" grp:alt_shift_toggle
sudo nano /etc/locale.gen
sudo locale-gen

echo " "
echo " "
echo "Now downloading wallpapers!"
echo " "
echo " "

sudo mkdir -p /usr/share/backgrounds/
sudo wget https://reisen.church/random/Material-Black-Pistachio-Numix-FLAT.zip -O /usr/share/icons/Material-Black-Pistachio-Numix-FLAT.zip
cd /usr/share/icons
sudo unzip Material-Black-Pistachio-Numix-FLAT.zip
sudo wget https://reisen.church/random/BlackAndWhite.zip -O /usr/share/themes/BlackAndWhite.zip
cd /usr/share/themes
sudo unzip BlackAndWhite.zip

sudo cp ~/.local/share/backgrounds/wallpaper.png /usr/share/backgrounds/wallpaper.png

echo " "
echo " "
echo "Your PC is ready! Now sync your keepassxc"
echo "Don't forget to move ssh keys and wireguard setup"
