summaryrefslogtreecommitdiff
path: root/deploy.sh
blob: c45efe6f76a7a98714341a40a718a8f1813a4e4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh

configurations=( iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi )


save () {
    for i in "${configurations[@]}"; do
        cp -r "$HOME/.config/$i" config/
    done

    cp -r "$HOME/.scripts" scripts

    cp $HOME/.profile profile
    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
}

load () {
    printf "\033[31mWARNING THIS WILL REPLACE EXISTING CONFIGURATIONS\n\033[0mTo proceed type 'confirm': "
    read confirmation

    if [[ $confirmation == "confirm" ]]; then 
        cp -r config/* $HOME/.config/
        cp -r scripts $HOME/.scripts

        cp bashrc $HOME/.bashrc
        cp bash_aliases $HOME/.bash_aliases

        cp Xdefaults $HOME/.Xdefaults
        cp xinitrc $HOME/.xinitrc
        cp profile $HOME/.profile

        cp -r fonts $HOME/.fonts

        echo "Copied configurations!"

    else
        echo cancelled
    fi
}

install () {
    PKG="yay -S "
    $PKG xorg xorg-xinit pulseaudio
    $PKG bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar picom rofi urxvt
    ln -s /usr/bin/rofi /usr/bin/dmenu
}

case $1 in
    "load")
        load
        ;;
    "save")
        save
        ;;
    "install")
        install
        ;;
    *)
        echo "USAGE: $0 [load/save]"
        ;;
esac