This repository has been archived by the owner on Apr 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
/
configure_quick.sh
191 lines (164 loc) · 7.95 KB
/
configure_quick.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
#!/usr/bin/env bash
quick_install() {
case "${install_opt}" in
Anarchy-Desktop) kernel="linux"
sh="/usr/bin/zsh"
shrc="${default}"
bootloader="grub"
net_util="networkmanager"
enable_nm=true
multilib=true
dhcp=true
desktop=true
base_install="base-devel linux linux-headers zsh zsh-syntax-highlighting grub dialog networkmanager wireless_tools wpa_supplicant os-prober ${base_defaults} "
if "${bluetooth}" ; then
base_install+="bluez bluez-utils pulseaudio-bluetooth "
enable_bt=true
fi
if "${enable_f2fs}" ; then
base_install+="f2fs-tools "
fi
if "${UEFI}" ; then
base_install+="efibootmgr "
fi
quick_desktop
base_install+="${DE} "
;;
Anarchy-Desktop-LTS) kernel="linux-lts"
sh="/usr/bin/zsh"
shrc="${default}"
bootloader="grub"
net_util="networkmanager"
enable_nm=true
multilib=true
dhcp=true
desktop=true
base_install="base-devel linux-lts linux-lts-headers zsh zsh-syntax-highlighting grub dialog networkmanager wireless_tools wpa_supplicant os-prober ${base_defaults} "
if "${bluetooth}" ; then
base_install+="bluez bluez-utils pulseaudio-bluetooth "
enable_bt=true
fi
if "${enable_f2fs}" ; then
base_install+="f2fs-tools "
fi
if "${UEFI}" ; then
base_install+="efibootmgr "
fi
quick_desktop
base_install+="${DE} "
;;
Anarchy-Server) kernel="linux"
sh="/usr/bin/zsh"
shrc="${default}"
bootloader="grub"
net_util="networkmanager"
enable_nm=true
multilib=true
dhcp=true
base_install="base-devel linux openssh linux-headers zsh zsh-syntax-highlighting grub dialog wireless_tools wpa_supplicant os-prober ${base_defaults} "
if "${bluetooth}" ; then
base_install+="bluez bluez-utils pulseaudio-bluetooth "
enable_bt=true
fi
if "${enable_f2fs}" ; then
base_install+="f2fs-tools "
fi
if "${UEFI}" ; then
base_install+="efibootmgr "
fi
;;
Anarchy-Server-LTS) kernel="linux-lts"
sh="/usr/bin/zsh"
shrc="${default}"
bootloader="grub"
net_util="networkmanager"
enable_nm=true
multilib=true
dhcp=true
base_install="base-devel openssh linux-lts linux-lts-headers zsh zsh-syntax-highlighting grub dialog wireless_tools wpa_supplicant os-prober ${base_defaults} "
if "${bluetooth}" ; then
base_install+="bluez bluez-utils pulseaudio-bluetooth "
enable_bt=true
fi
if "${enable_f2fs}" ; then
base_install+="f2fs-tools "
fi
if "${UEFI}" ; then
base_install+="efibootmgr "
fi
;;
esac
}
quick_desktop() {
while (true) ; do
de=$(dialog --ok-button "${done_msg}" --cancel-button "${cancel}" --menu "${environment_msg}" 14 60 5 \
"Anarchy-budgie" "${de24}" \
"Anarchy-cinnamon" "${de23}" \
"Anarchy-gnome" "${de22}" \
"Anarchy-openbox" "${de18}" \
"Anarchy-xfce4" "${de15}" 3>&1 1>&2 2>&3)
if [ -z "${de}" ]; then
if (dialog --yes-button "${yes}" --no-button "${no}" --yesno "\n${desktop_cancel_msg}" 10 60) then
return
fi
else
break
fi
done
if ! (</etc/pacman.conf grep "anarchy-local"); then
sed -i -e '$a\\n[anarchy-local]\nServer = file:///usr/share/anarchy/pkg\nSigLevel = Never' /etc/pacman.conf
fi
case "${de}" in
"Anarchy-xfce4") config_env="${de}"
start_term="exec startxfce4"
DE+="xfce4 xfce4-goodies ${extras} "
;;
"Anarchy-budgie") config_env="${de}"
start_term="export XDG_CURRENT_DESKTOP=Budgie:GNOME ; exec budgie-desktop"
DE+="budgie-desktop mousepad terminator nautilus gnome-backgrounds gnome-control-center ${extras} "
;;
"Anarchy-cinnamon") config_env="${de}"
DE+="cinnamon cinnamon-translations gnome-terminal file-roller p7zip zip unrar terminator ${extras} "
start_term="exec cinnamon-session"
;;
"Anarchy-gnome") config_env="${de}"
start_term="exec gnome-session"
DE+="gnome gnome-extra terminator ${extras} "
;;
"Anarchy-openbox") config_env="${de}"
start_term="exec openbox-session"
DE+="openbox thunar thunar-volman xfce4-terminal xfce4-panel xfce4-whiskermenu-plugin xcompmgr transset-df obconf lxappearance-obconf wmctrl gxmessage xfce4-pulseaudio-plugin xfdesktop xdotool opensnap ristretto oblogout obmenu-generator polkit-gnome ${extras} "
;;
esac
while (true) ; do
if "${VM}" ; then
case "${virt}" in
vbox) GPU="virtualbox-guest-utils virtualbox-guest-dkms "
;;
vmware) GPU="xf86-video-vmware xf86-input-vmmouse open-vm-tools net-tools gtkmm mesa mesa-libgl"
;;
hyper-v) GPU="xf86-video-fbdev mesa-libgl"
;;
*) GPU="xf86-video-fbdev mesa-libgl"
;;
esac
break
else
GPU="${default_GPU} mesa-libgl"
break
fi
done
DE+="${GPU} xdg-user-dirs xorg-server xorg-apps xorg-xinit xterm ttf-dejavu gvfs gvfs-smb gvfs-mtp pulseaudio pavucontrol pulseaudio-alsa alsa-utils unzip xf86-input-libinput lightdm-gtk-greeter lightdm-gtk-greeter-settings "
if [ "${net_util}" == "networkmanager" ] ; then
if (<<<"${DE}" grep "plasma" &> /dev/null); then
DE+="plasma-nm "
else
DE+="network-manager-applet "
fi
fi
if "${enable_bt}" ; then
DE+="blueman "
fi
DM="lightdm"
enable_dm=true
}