-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·98 lines (79 loc) · 2.46 KB
/
install.sh
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
cpcfg() {
echo "Installing $1"
cp "$1" "$HOME"/"$1"
}
cpcfgd() {
echo "Installing $1"
cp "$1" "$HOME"/"$2"/"$1"
}
cpcfgdf() {
echo "Installing $1"
cp "$1" "$HOME"/"$2"
}
fastcomputermessage() {
echo "Done!"
echo "The new config file is optimized for a fast computer by default. You can choose using the 'mpvcfgset' command."
}
echo "Creating melonDS config dir"
mkdir -p "$HOME"/.config/melonDS
echo "Creating Bash config dir"
mkdir -p "$HOME"/.config/bash-configs
echo "Creating Kitty config dir"
mkdir -p "$HOME"/.config/kitty
echo "Creating i3 config dir"
mkdir -p "$HOME"/.config/i3
echo "Creating compton config dir"
mkdir -p "$HOME"/.config/compton
echo "Creating BleachBit config dir"
mkdir -p "$HOME"/.config/bleachbit
echo "Creating Openbox config dir"
mkdir -p "$HOME"/.config/openbox
echo "Creating qutebrowser config dir"
mkdir -p "$HOME"/.config/qutebrowser
echo "Creating mpv config dir"
mkdir -p "$HOME"/.config/mpv
echo "Creating Git config dir"
mkdir -p "$HOME"/.config/git
echo "Creating Conky config dir"
mkdir -p "$HOME"/.config/conky
cpcfg .bashrc
cpcfg .profile
cpcfg .vimrc
cpcfgd kitty.conf .config/kitty
cpcfgd compton.conf .config/compton
cpcfgd melonDS.ini .config/melonDS
cpcfgd bleachbit.ini .config/bleachbit
cpcfgdf i3cfg .config/i3/config
cpcfgdf qutebrowser.py .config/qutebrowser/config.py
cpcfgdf obrc.xml .config/openbox/rc.xml
cpcfgdf obautostart.sh .config/openbox/autostart.sh
cpcfgdf mpvinput.conf .config/mpv/input.conf
cpcfgdf .gitconfig .config/git/config
cpcfgdf .conkyrc .config/conky/conkyrc
echo "Setting up mpv config symlink"
if [ -L "$HOME"/.config/mpv/mpv.conf ]; then
echo "mpv config symlink already set up"
elif [ -f "$HOME"/.config/mpv/mpv.conf ]; then
echo "mpv config file is NOT a symlink"
echo "Replace with symlink? A copy of the file will be created in $(pwd) under the name 'mpv.conf.old'."
read -p "(y = yes, n = no) : " yn
case $yn in
[Yy]* )
mv "$HOME"/.config/mpv/mpv.conf ./mpv.conf.old
ln -s "$(pwd)"/mpv-fastcomputer.conf "$HOME"/.config/mpv/mpv.conf
fastcomputermessage
;;
[Nn]* )
echo "Okay, keeping the old config file."
;;
* )
echo "I'll take this as a no."
;;
esac
else
echo "mpv config file not found, creating symlink"
ln -s "$(pwd)"/mpv-fastcomputer.conf "$HOME"/.config/mpv/mpv.conf
fastcomputermessage
fi
echo "Success"