-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-dotfiles.sh
167 lines (143 loc) · 5.54 KB
/
install-dotfiles.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/bash
func_printpipe() {
echo ' | '
}
func_printseparator() {
echo ''
echo ' [+] --------------------------------------------'
echo ' [+] Original writen by end-4 '
echo ' [+] --------------------------------------------'
echo ''
echo 'this script isnt maintained anymore'
}
func_home_install() {
if [ "$1" == "" ]; then
return # Do not wipe home folder
fi
func_printpipe
echo ' [>_] rm -rf '"${HOME:?}/${1:?}"
rm -rf "${HOME:?}/${1:?}"
echo ' [>_] cp -r '"./${1:?}" "${HOME:?}/${1:?}"
cp -r "./${1:?}" "${HOME:?}/${1:?}"
func_printpipe
}
func_welcome() {
echo ' [i] WARNING: Run this script IN ITS FOLDER, or it will not work!'
func_printseparator
echo ' [i] Using install scripts might mess up your setup without'
echo ' proper understanding.'
echo ' However, if you wish, we will proceed.'
echo ' [i] I'\''ll create a backup of your .config folder'
echo ' and will let you select what to copy from these dotfiles.'
echo ' Every command used will be shown.'
func_printseparator
echo -n ' [?] Shall we begin? [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
echo " [i] Let's go."
func_printseparator
else
printf " [i] Aborted.\n"
exit 0
fi
}
func_backup() {
echo ' [?] We will now backup your .config folder. '
echo ' | Hit Enter to proceed.'
echo ' +- Else, type "I understand the risk of not backing up."'
echo -n ' [>>>] '
read -r userInput
if [ "$userInput" == "I understand the risk of not backing up." ]; then
echo ' [i] Got it. You understand the risk of having no backup and will not backup.'
else
echo ' [i] Alright.'
echo ' [>_] cp -r "$HOME/.config" "$HOME/.config_BACKUP"'
cp -r "$HOME/.config" "$HOME/.config_BACKUP"
echo ' [i] Backup done.'
fi
func_printseparator
}
func_install_config() {
echo ' [?] Install waybar config? '
echo ' This is for the bar. '
echo -n ' [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/waybar/"
else
printf " [i] Skipping waybar config installation.\n"
fi
echo ' [?] Install Hyprland config?'
echo -n ' [A]ll/[n]one '
read -r userInput
if [ "$userInput" == "A" ] || [ "$userInput" == "a" ] || [ "$userInput" == "" ]; then
func_home_install ".config/hypr/"
else
if [[ "$userInput" == "N" ]] || [[ "$userInput" == "n" ]]; then
printf " [-] Skipping Hyprland config installation.\n"
fi
fi
echo -n ' [?] Install scripts config? This are may scripts recommended to install for Hyprland [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/scripts/"
else
printf " [-] Skipping scripts config installation.\n"
fi
echo -n ' [?] Install dunst config? This is for notification style [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/dunst/"
else
printf " [-] Skipping dunst config installation.\n"
fi
echo -n ' [?] Install swaylock config? This is locking your pc [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/swaylock/"
else
printf " [-] Skipping swaylock config installation.\n"
fi
echo -n ' [?] Install rofi config? This is for all the rofi scripts [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/rofi/"
else
printf " [-] Skipping rofi config installation.\n"
fi
echo -n ' [?] Install xfce4 config? This is for thunar [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/xfce4/"
else
printf " [-] Skipping xfce4(thunar) config installation.\n"
fi
echo -n ' [?] Install mimeapps.list? This definse your default applications [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/xfce4/"
else
printf " [-] Skipping installation of mimeapps.list .\n"
fi
echo -n ' [?] Install backgrounds? This is makes your first navigations easy [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/backgrouds/"
else
printf " [-] Skipping installation of backgrounds.\n"
fi
echo -n ' [?] Install .bashrc? This is for terminal [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".bashrc"
else
printf " [-] Skipping .bashrc installation.\n"
fi
echo -n ' [?] Install neofetch config? This your neofetch style [Y/n] '
read -r userInput
if [ "$userInput" == "y" ] || [ "$userInput" == "Y" ] || [ "$userInput" == "" ]; then
func_home_install ".config/neofetch/"
else
printf " [-] Skipping neofetch config installation.\n"
fi
}