dot/deploy.sh

83 lines
1.8 KiB
Bash
Raw Normal View History

2021-10-09 21:20:41 +00:00
#!/bin/sh
configurations=( iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi )
save () {
2021-10-09 21:35:24 +00:00
mkdir config
2021-10-09 21:20:41 +00:00
for i in "${configurations[@]}"; do
cp -r "$HOME/.config/$i" config/
done
2021-10-09 21:58:10 +00:00
rm -r scripts
2021-10-09 21:20:41 +00:00
cp -r "$HOME/.scripts" scripts
2021-10-09 21:30:23 +00:00
cp $HOME/.profile profile
2021-10-09 21:20:41 +00:00
cp $HOME/.bashrc bashrc
cp $HOME/.bash_aliases bash_aliases
cp $HOME/.Xdefaults Xdefaults
cp $HOME/.xinitrc xinitrc
mkdir -p fonts/TTF
cp -r /usr/share/fonts/ttf-mononoki fonts/
cp /usr/share/fonts/TTF/Meslo\ LG\ M\ Regular\ Nerd\ Font\ Complete\ Mono.ttf fonts/TTF/
mkdir -p fonts/noto-cjk
cp -r /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc fonts/noto-cjk
2021-10-09 21:34:01 +00:00
2021-10-09 21:37:52 +00:00
rm config/mpd/state
rm config/vim/viminfo
2021-10-09 21:20:41 +00:00
}
load () {
printf "\033[31mWARNING THIS WILL REPLACE EXISTING CONFIGURATIONS\n\033[0mTo proceed type 'confirm': "
read confirmation
if [[ $confirmation == "confirm" ]]; then
2021-10-09 21:59:49 +00:00
mkdir -p $HOME/.config
cp -r config/* $HOME/.config
mkdir -p $HOME/.scripts
cp -r scripts/* $HOME/.scripts
2021-10-09 21:20:41 +00:00
cp bashrc $HOME/.bashrc
cp bash_aliases $HOME/.bash_aliases
cp Xdefaults $HOME/.Xdefaults
cp xinitrc $HOME/.xinitrc
2021-10-09 21:30:23 +00:00
cp profile $HOME/.profile
2021-10-09 21:20:41 +00:00
2021-10-09 22:10:22 +00:00
mkdir -p $HOME/.fonts
2021-10-09 22:03:12 +00:00
cp -r fonts/* $HOME/.fonts
2021-10-09 21:20:41 +00:00
echo "Copied configurations!"
else
echo cancelled
fi
}
2021-10-09 21:24:22 +00:00
install () {
PKG="yay -S "
2021-10-09 23:27:22 +00:00
$PKG xorg xorg-xinit pulseaudio pulsemixer alsa-utils fzf bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi rxvt-unicode
2021-10-09 22:01:36 +00:00
2021-10-09 21:30:23 +00:00
ln -s /usr/bin/rofi /usr/bin/dmenu
2021-10-09 21:40:50 +00:00
2021-10-09 21:24:22 +00:00
}
2021-10-09 21:20:41 +00:00
case $1 in
"load")
load
;;
"save")
save
;;
2021-10-09 21:24:22 +00:00
"install")
install
;;
2021-10-09 21:20:41 +00:00
*)
2021-10-09 22:01:54 +00:00
echo "USAGE: $0 [load/save/install]"
2021-10-09 21:20:41 +00:00
;;
esac