-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostinstall
More file actions
executable file
·258 lines (231 loc) · 6.05 KB
/
postinstall
File metadata and controls
executable file
·258 lines (231 loc) · 6.05 KB
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
#! /bin/bash
set -euo pipefail
# Arch Linux (post-)install scripts
# Copyright (C) 2020
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dir="$(dirname "$0")"
#
# Fancy color output
#
show_error() {
echo -e $'\033[1;31m'"$*"$'\033[0m' 1>&2
}
show_info() {
echo -e $'\033[1;32m'"$*"$'\033[0m'
}
show_warning() {
echo -e $'\033[1;33m'"$*"$'\033[0m'
}
show_question() {
echo -e $'\033[1;34m'"$*"$'\033[0m'
}
ask_question() {
read -r -p $'\033[1;34m'"$* "$'\033[0m' var
echo "${var}"
}
show_success() {
echo -e $'\033[1;35m'"$*"$'\033[0m'
}
show_header() {
echo -e $'\033[1;36m'"$*"$'\033[0m'
}
show_listitem() {
echo -e $'\033[1;37m'"$*"$'\033[0m'
}
export -f show_error
export -f show_info
export -f show_warning
export -f show_question
export -f ask_question
export -f show_success
export -f show_header
export -f show_listitem
#
# Source the functions
#
. "${dir}"/functions/00-check
. "${dir}"/functions/01-base
. "${dir}"/functions/01-misc
. "${dir}"/functions/02-desktop
. "${dir}"/functions/03-network
. "${dir}"/functions/03-packages
. "${dir}"/functions/04-themes
. "${dir}"/functions/05-personal
#
# Define main select wrapper
#
function main {
show_question "Select an option:"
show_info "Main (Hit ENTER to see options again.)"
local options=(
"Quit"
"Autopilot"
"Base"
"Miscellaneous"
"Desktop environment"
"Network tools"
"Applications"
"Themes"
"Personalization")
select option in "${options[@]}"; do
case "${option}" in
"Quit")
show_success "I hope this was as fun for you as it was for me."
break
;;
"Autopilot")
local response
response=$(ask_question "Let this script install everything? (y/N)")
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
# Install base packages
install_base
update_mirrorlist
install_firmware
# enable_multilib
enable_sudo_insults
stylize_pacman
parallelize_pacman
disable_beep
# Install miscellaneous extras
install_zsh
# install_linux_hardened && kernel=linux-hardened
# install_linux_lts
# install_linux_zen
set_default_kernel
install_utils
# install_laptop
# Install a desktop environment
# install_gnome
install_cinnamon
# install_kde
# Set up network configuration
install_network
install_firewall
# install_tor
# tunnel_pacman_tor
# Install useful packages
install_3d_accel
# install_android
install_apps
# install_apps_kde
install_aur
# install_aur_kde
install_codecs
install_dev
install_extra
# install_extra_kde
# install_games
# install_kvm
# install_kvm_guest
install_messaging
# install_mingw
install_music
install_pipewire
install_printing
install_texlive
# install_torbrowser
install_vim
# install_neovim
# install_virtualbox
# install_virtualbox_guest
# install_wine
# Install themes
install_theme_deps_gtk
# install_theme_deps_kde
install_arc_gtk
# install_arc_kde
# install_adapta_gtk
# install_plata_gtk
# install_materia_gtk
# install_materia_kde
install_fonts
install_papirus_icons
install_colorific_themes
# install_thunderbird_theme
install_timed_backgrounds
set_qtcompat
# Add my personal settings
set_system_font
set_icon_theme
set_gtk_theme
# set_plasma_theme
set_lightdm_theme
# set_gdm_theme
# set_sddm_theme
set_dark_gtk
# set_bash_shell
set_zsh_shell
import_cinnamon_dconf
# import_gnome_dconf
# hide_avahi_apps
# import_kde_settings
import_apps_dconf
import_terminal_dconf
enable_autologin
# invert_brightness
# enable_intel_iommu
# disable_pulseaudio_suspend
disable_11n
install_scripts
show_success "Everything installed."
fi
show_info "Main (Hit ENTER to see options again.)"
;;
"Base")
01-base
show_info "Main (Hit ENTER to see options again.)"
;;
"Miscellaneous")
01-misc
show_info "Main (Hit ENTER to see options again.)"
;;
"Desktop environment")
02-desktop
show_info "Main (Hit ENTER to see options again.)"
;;
"Network tools")
03-network
show_info "Main (Hit ENTER to see options again.)"
;;
"Applications")
03-packages
show_info "Main (Hit ENTER to see options again.)"
;;
"Themes")
04-themes
show_info "Main (Hit ENTER to see options again.)"
;;
"Personalization")
05-personal
show_info "Main (Hit ENTER to see options again.)"
;;
*)
show_warning "Invalid option."
;;
esac
done
}
#
# Check if dependencies are installed and if network is working
#
check_user
check_network
sync_repos
install_post_dependencies
#
# GO!!!
#
main