dot/deploy.sh

125 lines
3 KiB
Bash
Raw Normal View History

2021-10-09 21:20:41 +00:00
#!/bin/sh
2023-11-20 23:33:59 +00:00
configurations="iocane bg bg.gif bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar compfy rofi user-dirs.dirs gtk-3.0 zathura sx mimeapps.list"
2021-10-09 21:20:41 +00:00
save () {
2021-10-09 21:35:24 +00:00
mkdir config
for i in ${configurations}; do
2021-10-09 21:20:41 +00:00
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
cp $HOME/.mkshrc mkshrc
cp $HOME/.sh_aliases sh_aliases
2023-07-11 14:28:11 +00:00
cp $HOME/.config/Xdefaults Xdefaults
2021-10-09 21:20:41 +00:00
mkdir -p fonts/TTF
2022-12-11 18:45:10 +00:00
cp -r $HOME/.fonts/ttf-mononoki fonts/
cp $HOME/.fonts/TTF/Meslo\ LG\ M\ Regular\ Nerd\ Font\ Complete\ Mono.ttf fonts/TTF/
2021-10-09 21:20:41 +00:00
mkdir -p fonts/noto-cjk
2022-12-11 18:45:10 +00:00
cp -r $HOME/.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-12-13 20:05:03 +00:00
mkdir -p .local/share/
cp ~/.local/share/kaomoji .local/share/
2021-10-09 21:37:52 +00:00
rm config/mpd/state
2021-12-13 20:05:03 +00:00
rm config/mpd/pid
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
2023-03-31 12:05:02 +00:00
rm config/vim/viminfo*
2021-12-05 22:02:25 +00:00
rm -r config/mpv/shaders
2021-10-09 21:37:52 +00:00
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
2022-05-16 11:28:13 +00:00
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 mkshrc $HOME/.mkshrc
cp sh_aliases $HOME/.sh_aliases
2021-10-09 21:20:41 +00:00
2023-07-11 14:28:11 +00:00
cp Xdefaults $HOME/.config/Xdefaults
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-12-13 20:05:03 +00:00
cp .local/share/kaomoji ~/.local/share/
2021-10-12 22:20:01 +00:00
2023-03-01 00:07:40 +00:00
mkdir -p ~/.urxvt/ext/
2023-07-15 22:30:56 +00:00
git clone https://github.com/simmel/urxvt-resize-font /tmp/urxvt-resize-font
2023-03-01 00:07:40 +00:00
cp /tmp/urxvt-resize-font/resize-font ~/.urxvt/ext/
2023-03-16 11:32:48 +00:00
cd slock
./deploy.sh
cd -
2023-07-15 22:30:56 +00:00
cd st
./deploy.sh
cd -
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