dot/deploy.sh

108 lines
2.6 KiB
Bash
Raw Normal View History

2021-10-09 21:20:41 +00:00
#!/bin/sh
2021-10-12 22:20:01 +00:00
configurations=( iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi user-dirs.dirs gtk-3.0)
2021-10-09 21:20:41 +00:00
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-12 22:20:01 +00:00
cp $HOME/.gtkrc-2.0 gtkrc-2.0
2021-10-09 21:34:01 +00:00
2021-10-12 22:20:01 +00:00
rm -r themes
mkdir -p themes
cp -r $HOME/.themes/vimix-vski themes/vimix-vski
rm -r icons
cp -r $HOME/.local/share/icons/pixelfun3 icons/
2021-10-09 21:37:52 +00:00
rm config/mpd/state
2021-10-10 01:23:03 +00:00
rm config/mpd/password
2021-10-14 20:07:48 +00:00
rm config/mpd/database
rm config/mpd/sticker.sql
2021-10-09 21:37:52 +00:00
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
2021-10-12 22:20:01 +00:00
mkdir -p $HOME/.themes/vimix-vski
cp -r themes/vimix-vski/* $HOME/.themes/vimix-vski/
cp gtkrc-2.0 $HOME/.gtkrc-2.0
mkdir -p $HOME/.local/src/vimix-icon-theme
git clone https://github.com/vinceliuice/vimix-icon-theme $HOME/.local/src/vimix-icon-theme
cd $HOME/.local/src/vimix-icon-theme
./install.sh
cd -
mkdir -p $HOME/.local/share/icons
cp -r icons/* $HOME/.local/share/icons/
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-10 01:23:03 +00:00
$PKG xorg xorg-xinit pulseaudio pulsemixer alsa-utils pulseaudio-alsa xdg-user-dirs fzf bspwm cava neofetch mpd mpv libvdpau-va-gl ncmpcpp vim sxhkd polybar picom rofi rxvt-unicode zathura zathura-pdf-mupdf pcmanfm maim
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