Update
This commit is contained in:
parent
052966fda8
commit
316d424647
|
@ -17,7 +17,7 @@ if [[ "$UID" != 0 ]]; then
|
|||
if [ "${group}" == "wheel" ] || [ "${group}" == "root" ]; then
|
||||
counter=$(( counter + 1 ))
|
||||
echo "The user '${USER}' is a member of the group ${group}"
|
||||
if [ ! -x "$0" ];
|
||||
if [ ! -x "$0" ]; then
|
||||
chmod +x "$0"
|
||||
fi
|
||||
sudo /bin/sh -c "$0"
|
||||
|
@ -56,6 +56,11 @@ fi
|
|||
# echo "USER IS ROOT"
|
||||
# fi
|
||||
|
||||
ref=$(kdialog --progressbar "The computer is being configured. Wait until the desktop loads" 100 --title "Waiting for the computer to complete setup")
|
||||
|
||||
qdbus $ref org.kde.kdialog.ProgressDialog.autoClose true
|
||||
sleep 1
|
||||
|
||||
grep_text=$(ss -nlp | grep 9050)
|
||||
if [[ "$?" == 0 ]]; then
|
||||
export http_proxy="socks5://127.0.0.1:9050"
|
||||
|
@ -66,7 +71,8 @@ fi
|
|||
ping -c 1 1.1.1.1 > /dev/null
|
||||
have_internet="$?"
|
||||
|
||||
# sleep 1
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 10
|
||||
sleep 1
|
||||
|
||||
cd "/root"
|
||||
|
||||
|
@ -76,10 +82,16 @@ rm -rf /etc/pacman.d/gnupg/*
|
|||
mkdir -p /root/.gnupg 2>/dev/null
|
||||
chmod 700 /root/.gnupg
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 20
|
||||
sleep 1
|
||||
|
||||
haveged -w 1024
|
||||
pacman-key --init
|
||||
pkill haveged
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 30
|
||||
sleep 1
|
||||
|
||||
pacman-key --add /usr/share/pacman/keyrings/melawy-linux.gpg
|
||||
pacman-key --lsign-key BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8
|
||||
pacman-key --lsign-key B175815513971572FE7B1557CEC07AC8FF64DA4B
|
||||
|
@ -107,13 +119,22 @@ pacman-key --lsign-key chaotic
|
|||
pacman-key --add /usr/share/pacman/keyrings/endeavouros.gpg
|
||||
pacman-key --lsign-key endeavouros
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 40
|
||||
sleep 1
|
||||
|
||||
pacman-key --populate
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 50
|
||||
sleep 1
|
||||
|
||||
echo "
|
||||
keyserver hkp://keyserver.ubuntu.com:80" | sudo tee --append /etc/pacman.d/gnupg/gpg.conf
|
||||
|
||||
pacman-key --updatedb
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 60
|
||||
sleep 1
|
||||
|
||||
# if [ "$have_internet" -eq 0 ]; then
|
||||
# pacman -Sy
|
||||
# fi
|
||||
|
@ -150,5 +171,10 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 100
|
||||
sleep 1
|
||||
|
||||
qdbus $ref org.kde.kdialog.ProgressDialog.close
|
||||
|
||||
echo "Finish!!!"
|
||||
sleep 5
|
||||
|
|
|
@ -2,10 +2,15 @@
|
|||
|
||||
sleep 5
|
||||
|
||||
ref=$(kdialog --progressbar "The computer is being configured. Wait until the desktop loads" 100 --title "Waiting for the computer to complete setup")
|
||||
qdbus $ref org.kde.kdialog.ProgressDialog.autoClose true
|
||||
|
||||
theme="com.github.Melawy.Melawy-round-gray.Nier-A2.desktop"
|
||||
|
||||
plasma-apply-lookandfeel -a "$theme" --resetLayout
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 10
|
||||
|
||||
if [ "$(whoami)" != "liveuser" ]; then
|
||||
sleep 5
|
||||
if [ -f "$HOME/.config/autostart/reset-layout.desktop" ]; then
|
||||
|
@ -14,6 +19,7 @@ if [ "$(whoami)" != "liveuser" ]; then
|
|||
# rm "$HOME/.local/bin/reset-layout.sh"
|
||||
fi
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 20
|
||||
sleep 1
|
||||
|
||||
normal_process=$(ps -eo pcpu,stat,comm | grep plasmashell | grep 'S<sl')
|
||||
|
@ -23,8 +29,14 @@ if [ -z "$normal_process" ]; then
|
|||
systemctl --user restart plasma-plasmashell
|
||||
fi
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 30
|
||||
sleep 1
|
||||
|
||||
notify-send -t 5000 -a "Theme is" "$theme" "$(date '+%Y.%m.%d %H:%M:%S')"
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 100
|
||||
sleep 1
|
||||
|
||||
qdbus $ref org.kde.kdialog.ProgressDialog.close
|
||||
|
||||
echo "Ready"
|
||||
|
|
Loading…
Reference in New Issue