-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpostinstall.sh
executable file
·40 lines (33 loc) · 1.07 KB
/
postinstall.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
#!/bin/bash
## calamares shellprocess_postinstall.conf
# run chroot
clean_post() {
local files_rm=(
/etc/systemd/system/multi-user.target.wants/{choose-mirror.service,pacman-init.service,reflector.service}
)
local i
for i in ${files_rm[*]}; do rm -rf $i; done
}
enable_dm() {
rm /etc/systemd/system/display-manager.service
[[ $(pacman -Qs sddm) ]] && systemctl enable sddm
[[ $(pacman -Qs lightdm) ]] && systemctl enable lightdm
[[ $(pacman -Qs lxdm) ]] && systemctl enable lxdm
[[ $(pacman -Qs gdm) ]] && systemctl enable gdm
# systemctl set-default graphical.target
}
# fix calamares 3.3.5, plasma 6 xsession
_conf() {
if [ -f "/etc/sddm.conf" && -f "/usr/share/xsessions/plasmax11.desktop" ]; then
sed -i "s/Session=.*/Session=plasmax11/" /etc/sddm.conf
fi
if [ ! -f "/usr/share/xsessions/plasmax11.desktop" ]; then
echo "QT_QPA_PLATFORMTHEME=qt5ct" > /etc/environment
#echo "QT_STYLE_OVERRIDE=kvantum" > /etc/environment
echo "GTK_THEME=Ctlos-Dark" >> /etc/environment
fi
}
clean_post
enable_dm
_conf
rm /usr/local/bin/postinstall.sh