-
Notifications
You must be signed in to change notification settings - Fork 3
/
3-user-install-kde.sh
157 lines (141 loc) · 4.39 KB
/
3-user-install-kde.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
#!/bin/bash
# set some colors
CNT="[\e[1;36mNOTE\e[0m]"
COK="[\e[1;32mOK\e[0m]"
CER="[\e[1;31mERROR\e[0m]"
CAT="[\e[1;37mATTENTION\e[0m]"
CWR="[\e[1;35mWARNING\e[0m]"
CAC="[\e[1;33mACTION\e[0m]"
# install desktop
echo -e "\n$CNT install plasma-meta yakuake ............................."
paru -S plasma-meta konsole sddm xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-kde xorg-xeyes \
wl-clipboard spectacle plasma-wayland-protocols gwenview dolphin \
ark 7-zip-full unrar unarchiver kate google-chrome \
libreoffice-still libreoffice-still-zh-cn \
linuxqq visual-studio-code-bin wechat-universal-bwrap
sleep 1
# setup sddm
echo -e "\n$CNT starting setup sddm ........................"
sudo systemctl enable sddm
sleep 1
# setup blue
echo -e "\n$CNT starting setup blue ........................"
sudo systemctl enable --now bluetooth
sleep 1
# close kde baloo
echo -e "\n$CNT starting Disabling the baloo ........................."
balooctl6 suspend
sleep 1
balooctl6 disable
sleep 1
balooctl6 purge
sleep 1
# disable startup discover
mkdir ~/.config/autostart
cp /etc/xdg/autostart/org.kde.discover.notifier.desktop ~/.config/autostart/
cp /etc/xdg/autostart/kaccess.desktop ~/.config/autostart/
sleep 1
echo Hidden=True >> ~/.config/autostart/org.kde.discover.notifier.desktop
echo Hidden=True >> ~/.config/autostart/kaccess.desktop
sleep 1
echo -e "\n$CAC disable startup discover done ..................."
# set fcitx env
mkdir ~/.config/environment.d
sleep 1
cat << EOF > ~/.config/environment.d/env.conf
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
EOF
sleep 1
echo -e "\n$CAC set fcitx env done ..................."
# # kvm qemu install
# read -rep $'[\e[1;37mATTENTION\e[0m] - Are you install virt-manager qemu ? (y,n) ' QEMU
# if [[ $QEMU == "Y" || $QEMU == "y" ]]; then
# echo -e "$CNT - Setup starting install virt-manager qemu-full dnsmasq iptables-nft samba ..................."
# paru -S virt-manager qemu-desktop dnsmasq iptables-nft samba
# sleep 1
# # smb config
# echo -e "\n$CNT starting config smb ........................"
# sudo sh -c 'cat << EOF > /etc/samba/smb.conf
# [Shared]
# comment = Shared Folder for QEMU
# path = /home/liu/Shared
# public = yes
# valid users = liu
# browseable = yes
# writeable = yes
# read only = no
# security = user
# passdb backend = tdbsam
# force user = liu
# [global]
# server min protocol = NT1
# lanman auth = yes
# ntlm auth = yes
# EOF'
# sleep 1
# sudo systemctl enable --now smb
# sleep 1
# read -rep $'[\e[1;37mATTENTION\e[0m] - Enter the smb password: ' SMBP
# echo -e "${SMBP}\n${SMBP}" | sudo smbpasswd -a $USER
# sleep 1
# # libvirt config
# sleep 1
# echo -e "\n$CNT starting config libvirt ........................"
# sudo usermod -a -G libvirt $USER
# sudo sh -c 'cat << EOF > /etc/polkit-1/rules.d/50-libvirt.rules
# polkit.addRule(function(action, subject) {
# if (action.id == "org.libvirt.unix.manage" &&
# subject.isInGroup("libvirt")) {
# return polkit.Result.YES;
# }
# });
# EOF'
# sleep 1
# sudo systemctl enable --now libvirtd.service
# sleep 1
# sudo virsh net-autostart default
# # configure qemu
# sudo sed -i '/GRUB_CMDLINE_LINUX_DEFAULT=/s/.$/ qxl bochs_drm&/' /etc/default/grub
# sudo grub-mkconfig -o /efi/grub/grub.cfg
# # end
# sleep 1
# echo -e "\n$CAC virt-manager qemu done ..................."
# fi
# # setup xrandr
# read -rep $'[\e[1;37mATTENTION\e[0m] - Are you install xrandr and configure it? (y,n) ' XRANDR
# if [[ $XRANDR == "Y" || $XRANDR == "y" ]]; then
# echo -e "$CNT - Setup starting install xrandr and configure ..................."
# paru -S xorg-xrandr
# sleep 1
# sudo sh -c 'cat << EOF >> /usr/share/sddm/scripts/Xsetup
# intern=eDP-1
# extern1=DP-1-1
# extern2=DP-1-2
# xrandr=\$(xrandr)
# output=
# if [[ "\$xrandr" =~ "\$extern1 connected" ]]; then
# output=\$extern1
# elif [[ "\$xrandr" =~ "\$extern2 connected" ]]; then
# output=\$extern2
# fi
# if [[ -n "\$output" ]]; then
# xrandr --output "\$intern" --off --output "\$output" --auto
# else
# xrandr --output "\$intern" --auto
# fi
# EOF'
# sleep 1
# echo -e "\n$CAC xrandr done ..................."
# fi
# sleep 1
# # install wireshark
# read -rep $'[\e[1;37mATTENTION\e[0m] - Are you install wireshark and configure it? (y,n) ' WIRESHARK
# if [[ $WIRESHARK == "Y" || $WIRESHARK == "y" ]]; then
# paru -S wireshark-qt
# sleep 1
# sudo gpasswd -a $USER wireshark
# sleep 1
# fi
echo -e "\n$COK Has been completed. >>>>>>>>>>>>>>>>> reboot \n"