2020-03-09 19:38:07 +01:00
|
|
|
#!/usr/bin/env sh
|
2020-03-08 10:19:00 +01:00
|
|
|
|
|
|
|
greeter() {
|
|
|
|
cat <<EOF
|
|
|
|
_ _
|
|
|
|
__| | ___ | |_ _ __ ___ __ _ _ __
|
|
|
|
/ _\` |/ _ \\| __| '_ \` _ \ / _\` | '_ \
|
|
|
|
| (_| | (_) | |_| | | | | | (_| | | | |
|
|
|
|
\__,_|\___/ \__|_| |_| |_|\__,_|_| |_|
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
# Logs
|
|
|
|
LOG_DIR="$HOME/.log/dotfiles/$(date +"%d-%m-%Y-%H:%M:%S")/"
|
|
|
|
mkdir -p $LOG_DIR
|
|
|
|
|
|
|
|
install_yay() {
|
|
|
|
sudo pacman -S --noconfirm --needed git
|
|
|
|
mkdir -p ~/.cache/dotfiles/
|
|
|
|
cd ~/.cache/dotfiles/
|
|
|
|
git clone https://aur.archlinux.org/yay.git
|
|
|
|
cd yay
|
|
|
|
makepkg -si --noconfirm
|
|
|
|
}
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
install_packages() {
|
2020-03-13 20:21:00 +01:00
|
|
|
yay -S --noconfirm --needed reflector
|
|
|
|
|
|
|
|
sudo reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
|
|
|
|
|
2020-03-15 00:09:25 +01:00
|
|
|
yay -S --noconfirm --needed neovim qutebrowser telegram-desktop minecraft-launcher dunst bspwm sxhkd htop mpd ncmpcpp picom ranger rofi transmission-cli vlc zsh youtube-dl grc curl wget xclip figlet w3m xorg-server xorg-xinit ttf-font-awesome ttf-dejavu vifm feh xorg-xsetroot lxappearance python-pip alsa-utils tmux networkmanager maim fzf exfat-utils fuse2 udiskie udisks2 imagemagick i3lock-color man checkupdates+aur pacman-contrib polybar ccls clang eslint flake8 shellcheck clang-format-linter-git prettier python-black github-cli ncdu mpc neomutt bc cli-visualizer clipmenu gradle ktlint rofi-calc
|
2020-03-09 17:06:32 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
pip3 install --user -U pynvim msgpack
|
2020-03-11 17:54:12 +01:00
|
|
|
sudo pip install -U grip
|
2020-03-09 19:30:53 +01:00
|
|
|
}
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-14 22:39:25 +01:00
|
|
|
install_st_and_dmenu() {
|
2020-03-09 19:30:53 +01:00
|
|
|
cd ~/.cache/dotfiles/
|
2020-03-12 20:55:48 +01:00
|
|
|
git clone https://github.com/samedamci/st
|
2020-03-09 19:30:53 +01:00
|
|
|
cd st
|
|
|
|
sudo make clean install
|
2020-03-14 22:39:25 +01:00
|
|
|
cd ~/.cache/dotfiles/
|
|
|
|
git clone https://github.com/samedamci/dmenu
|
|
|
|
cd dmenu
|
|
|
|
sudo make clean install
|
2020-03-09 19:30:53 +01:00
|
|
|
}
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
config_pacman() {
|
|
|
|
su root -c "cat >/etc/pacman.conf <<EOF
|
|
|
|
|
|
|
|
#
|
|
|
|
# /etc/pacman.conf
|
|
|
|
#
|
|
|
|
# See the pacman.conf(5) manpage for option and repository directives
|
|
|
|
|
|
|
|
#
|
|
|
|
# GENERAL OPTIONS
|
|
|
|
#
|
|
|
|
[options]
|
|
|
|
# The following paths are commented out with their default values listed.
|
|
|
|
# If you wish to use different paths, uncomment and update the paths.
|
|
|
|
#RootDir = /
|
|
|
|
#DBPath = /var/lib/pacman/
|
|
|
|
#CacheDir = /var/cache/pacman/pkg/
|
|
|
|
#LogFile = /var/log/pacman.log
|
|
|
|
#GPGDir = /etc/pacman.d/gnupg/
|
|
|
|
#HookDir = /etc/pacman.d/hooks/
|
|
|
|
HoldPkg = pacman glibc
|
|
|
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
|
|
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
|
|
|
#CleanMethod = KeepInstalled
|
|
|
|
Architecture = auto
|
|
|
|
|
|
|
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
|
|
|
#IgnorePkg =
|
|
|
|
#IgnoreGroup =
|
|
|
|
|
|
|
|
#NoUpgrade =
|
|
|
|
#NoExtract =
|
|
|
|
|
|
|
|
# Misc options
|
|
|
|
#UseSyslog
|
|
|
|
Color
|
|
|
|
ILoveCandy
|
|
|
|
TotalDownload
|
|
|
|
CheckSpace
|
|
|
|
VerbosePkgLists
|
|
|
|
|
|
|
|
# By default, pacman accepts packages signed by keys that its local keyring
|
|
|
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
|
|
|
SigLevel = Required DatabaseOptional
|
|
|
|
LocalFileSigLevel = Optional
|
|
|
|
#RemoteFileSigLevel = Required
|
|
|
|
|
|
|
|
#[testing]
|
|
|
|
#Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
[core]
|
|
|
|
Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
[extra]
|
|
|
|
Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
#[community-testing]
|
|
|
|
#Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
[community]
|
|
|
|
Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
#[multilib-testing]
|
|
|
|
#Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
#[multilib]
|
|
|
|
#Include = /etc/pacman.d/mirrorlist
|
|
|
|
|
|
|
|
EOF"
|
|
|
|
}
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
copy_configs() {
|
|
|
|
cd ~/Dotfiles/botfiles/.config
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
cp -r * ~/.config/
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 20:43:25 +01:00
|
|
|
if [ "$HOSTNAME" = "pc" ]; then
|
2020-03-10 15:16:16 +01:00
|
|
|
echo "Use pc config..."
|
2020-03-09 19:30:53 +01:00
|
|
|
mv ~/.config/polybar/config.pc ~/.config/polybar/config
|
2020-03-10 15:16:16 +01:00
|
|
|
mv ~/.config/sxhkd/sxhkdrc.pc ~/.config/sxhkd/sxhkdrc
|
2020-03-09 20:43:25 +01:00
|
|
|
elif [ "$HOSTNAME" = "laptop" ]; then
|
2020-03-09 19:30:53 +01:00
|
|
|
echo "Use laptop config..."
|
|
|
|
mv ~/.config/polybar/config.laptop ~/.config/polybar/config
|
2020-03-10 15:16:16 +01:00
|
|
|
mv ~/.config/sxhkd/sxhkdrc.laptop ~/.config/sxhkd/sxhkdrc
|
2020-03-09 19:30:53 +01:00
|
|
|
fi
|
2020-03-08 11:37:23 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
cd ~/Dotfiles/botfiles
|
|
|
|
mkdir -p ~/.local/share/TelegramDesktop/tdata/
|
|
|
|
cp shortcuts-custom.json ~/.local/share/TelegramDesktop/tdata
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
cp .zshrc .aliases .zprofile .Xresources .xinitrc ~/
|
2020-03-11 21:48:22 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
cp -r .scripts ~/
|
2020-03-11 21:48:22 +01:00
|
|
|
cd ~/.scripts/
|
2020-03-11 21:50:49 +01:00
|
|
|
rm -rf rofi-keepassxc
|
2020-03-11 21:48:22 +01:00
|
|
|
git clone https://github.com/samedamci/rofi-keepassxc
|
2020-03-09 19:30:53 +01:00
|
|
|
chmod +x ~/.scripts/*
|
2020-03-11 21:48:22 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
cd ~/.config/zsh
|
|
|
|
rm -rf plugins
|
|
|
|
mkdir plugins
|
|
|
|
cd plugins
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting
|
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
sudo mkdir /media
|
|
|
|
}
|
2020-03-08 10:19:00 +01:00
|
|
|
|
2020-03-09 19:30:53 +01:00
|
|
|
sudo -v
|
2020-03-08 10:19:00 +01:00
|
|
|
clear
|
2020-03-09 19:30:53 +01:00
|
|
|
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
|
|
|
|
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
|
|
|
|
greeter
|
2020-03-14 22:39:25 +01:00
|
|
|
printf "\nDo you want to compile nad install st and dmenu? (Y/n): "; read CHOICE
|
|
|
|
if [ "$CHOICE" = "Y" ]; then echo "Compiling and installing st and dmenu..." && install_st_and_dmenu &>$LOG_DIR/install_st_and_dmenu.log; fi
|
2020-03-09 19:30:53 +01:00
|
|
|
clear
|
|
|
|
greeter
|
|
|
|
printf "\nDo you want to copy configs? (Y/n): "; read CHOICE
|
|
|
|
if [ "$CHOICE" = "Y" ]; then
|
|
|
|
printf "Moving configs...\n"
|
|
|
|
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
|