Update
This commit is contained in:
parent
ad46b1e4b3
commit
fef151ed29
|
@ -56,11 +56,6 @@ 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"
|
||||
|
@ -71,9 +66,6 @@ fi
|
|||
ping -c 1 1.1.1.1 > /dev/null
|
||||
have_internet="$?"
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 10
|
||||
sleep 1
|
||||
|
||||
cd "/root"
|
||||
|
||||
rm -rf /var/lib/pacman/sync/*
|
||||
|
@ -82,16 +74,10 @@ 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
|
||||
|
@ -119,22 +105,13 @@ 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
|
||||
|
@ -171,10 +148,5 @@ 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
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
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"
|
||||
|
||||
# Force Zenity Status message box to always be on top.
|
||||
(
|
||||
sleep 5
|
||||
|
||||
echo "# Set theme"; sleep 1
|
||||
plasma-apply-lookandfeel -a "$theme" --resetLayout
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 10
|
||||
|
||||
echo "25"
|
||||
echo "# Remove unneeded link"; sleep 1
|
||||
if [ "$(whoami)" != "liveuser" ]; then
|
||||
sleep 5
|
||||
if [ -f "$HOME/.config/autostart/reset-layout.desktop" ]; then
|
||||
|
@ -19,24 +19,31 @@ if [ "$(whoami)" != "liveuser" ]; then
|
|||
# rm "$HOME/.local/bin/reset-layout.sh"
|
||||
fi
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 20
|
||||
sleep 1
|
||||
|
||||
echo "50"
|
||||
echo "# Get status of plasmashell"; sleep 2
|
||||
normal_process=$(ps -eo pcpu,stat,comm | grep plasmashell | grep 'S<sl')
|
||||
|
||||
echo "75"
|
||||
if [ -z "$normal_process" ]; then
|
||||
echo "Restart plasma-plasmashell"
|
||||
echo "# Restart plasma-plasmashell"; sleep 1
|
||||
systemctl --user restart plasma-plasmashell
|
||||
fi
|
||||
|
||||
qdbus $ref Set org.kde.kdialog.ProgressDialog value 30
|
||||
sleep 1
|
||||
echo "99"
|
||||
echo "# All finished."; sleep 1
|
||||
echo "100"
|
||||
) |
|
||||
zenity --progress \
|
||||
--title="Waiting for the computer to complete setup. DO NOT CLOSE OR CANCEL!" \
|
||||
--text="Run" \
|
||||
--percentage=0 \
|
||||
--auto-close \
|
||||
--auto-kill
|
||||
|
||||
(( $? != 0 )) && zenity --error --text="Error in zenity command."
|
||||
|
||||
sleep 5
|
||||
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"
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue