-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_config.sh
executable file
·326 lines (257 loc) · 5.16 KB
/
install_config.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#!/bin/bash
. ./helpers.sh
## must be root
RootCheck
## begin configuration
TaggedEcho "Beginning configurations..."
apt update
NewLine
TaggedEcho "Disabling mouse acceleration..."
mkdir -p /usr/share/X11/xorg.conf.d/
cp -r ./files/root/usr/share/X11/xorg.conf.d/50-mouse-acceleration.conf /usr/share/X11/xorg.conf.d/
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing htop..."
apt install -y htop
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing i3wm..."
sudo apt install -y i3
if [[ $? -eq 0 ]]; then
mkdir -p $HOME_DIR/.config/i3
cp -r ./files/home/.config/i3/* $HOME_DIR/.config/i3/
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
TaggedEcho "Installing i3blocks..."
sudo apt install -y i3blocks
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing xterm..."
sudo apt install -y xterm
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing Rofi..."
sudo apt install -y rofi
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing feh and wallpapers..."
sudo apt install -y feh
if [[ $? -eq 0 ]]; then
cp -r ./files/home/Pictures $HOME_DIR/
if [[ $? -eq 0 ]]; then
cp -r ./files/home/.config/.fehbg $HOME_DIR/.config/
if [[ $? -eq 0 ]]; then
if [[ -f "/var/spool/cron/crontabs/$USER_NAME" ]]; then
Notice
TaggedEcho "Didn't create crontab, make sure feh job got added!"
else
touch /var/spool/cron/crontabs/$USER_NAME
if [[ $? -eq 0 ]]; then
crontab -u $USER_NAME -l > ./temp_cron
if [[ $? -eq 0 ]]; then
DISPLAY_VAR="$(env | grep -i display)"
echo "0 */1 * * * $DISPLAY_VAR $HOME_DIR/.config/.fehbg" >> temp_cron
if [[ $? -eq 0 ]]; then
crontab -u $USER_NAME temp_cron
if [[ $? -eq 0 ]]; then
rm temp_cron
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
else
Failure
fi
else
Failure
fi
else
Failure
fi
fi
else
Failure
fi
else
Failure
fi
else
Failure
fi
NewLine
TaggedEcho "Installing ranger with image previews..."
apt install -y ranger
if [[ $? -eq 0 ]]; then
TaggedEcho "ranger installed successfully"
TaggedEcho "Installing w3m..."
apt install -y w3m-img
if [[ $? -eq 0 ]]; then
mkdir -p $HOME_DIR/.config/ranger
touch $HOME_DIR/.config/ranger/rc.conf
if [[ $? -eq 0 ]]; then
echo -e "\nset preview_images true" >> $HOME_DIR/.config/ranger/rc.conf
if [[ $? -eq 0 ]]; then
chmod 777 $HOME_DIR/.config/ranger
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
else
Failure
fi
else
Failure
fi
else
Failure
fi
NewLine
TaggedEcho "Installing fonts..."
cp -r ./files/home/.fonts $HOME_DIR
if [[ $? -eq 0 ]]; then
chmod 755 $HOME_DIR/.fonts
if [[ $? -eq 0 ]]; then
cp ./files/home/.fonts.conf $HOME_DIR
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
else
Failure
fi
TaggedEcho "Installing FontAwesome..."
apt install -y fonts-font-awesome
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing PulseAudio Volume Control..."
sudo apt install -y pavucontrol
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing Redshift..."
apt install -y redshift-gtk
if [[ $? -eq 0 ]]; then
mkdir -p $HOME_DIR/.config/redshift
cp ./files/home/.config/redshift/redshift.conf $HOME_DIR/.config/redshift/
chmod 777 $HOME_DIR/.config/redshift/redshift.conf
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
NewLine
TaggedEcho "Installing Flameshot..."
apt install -y flameshot
if [[ $? -eq 0 ]]; then
mkdir -p $HOME_DIR/.config/Dharkael
cp ./files/home/.config/Dharkael/flameshot.ini $HOME_DIR/.config/Dharkael/
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
NewLine
TaggedEcho "Updating .Xresources..."
cp ./files/home/.Xresources $HOME_DIR
if [[ $? -eq 0 ]]; then
xrdb -merge $HOME_DIR/.Xresources
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
else
Failure
fi
NewLine
TaggedEcho "Updating dunstrc..."
rm -f /etc/xdg/dunst/dunstrc
cp ./files/root/etc/xdg/dunst/dunstrc /etc/xdg/dunst/dunstrc
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
TaggedEcho "Installing qalc..."
apt install -y qalc
if [[ $? -eq 0 ]]; then
Done
else
Failure
fi
NewLine
## donezo
# notices check
if [[ Notices -ne 0 ]]; then
if [[ Notices -eq 1 ]]; then
TaggedEcho "There was a NOTICE!"
else
TaggedEcho "There were $Notices NOTICES!"
fi
fi
# errors check
if [[ Errors -ne 0 ]]; then
if [[ Errors -eq 1 ]]; then
TaggedEcho "Configuration not fully complete, there was an error."
echo " (Look for '*** FAILED ***' above)"
else
TaggedEcho "Configuration not fully complete, there were $Errors errors."
echo " (Look for any '*** FAILED ***' above)"
fi
else
TaggedEcho "Finished with no errors! Reboot to complete configuration."
echo " (Don't forget to select i3 as your desktop)"
fi
PulseReminder