This commit is contained in:
Valeria Fadeeva 2023-11-23 01:52:54 +05:00
parent 307686681d
commit f993f2cd21
3 changed files with 44 additions and 12 deletions

View File

@ -2,7 +2,7 @@
if [[ "$UID" != 0 ]]; then
echo "USER NOT ROOT"
sudo $0
sudo "$0"
exit
else
echo "USER IS ROOT"
@ -12,6 +12,7 @@ sleep 20
cd "/root"
mkdir -p /root/.gnupg 2>/dev/null
chmod 700 /root/.gnupg
haveged -w 1024
@ -36,8 +37,31 @@ pacman-key --updatedb
pacman -Syy
if [ "$(whoami)" != "liveuser" ]; then
sleep 5
rm $HOME/.config/autostart/key-sign.sh.desktop
rm $HOME/.local/userbin/key-sign.sh
fi
title="Successed!"
msg="$(date '+%Y.%m.%d %H:%M:%S')"
users=$(/usr/bin/users | sed 's| |\n|g' | sort | uniq)
for user in $users
do
userid=$(/usr/bin/id -u "$user")
cmd=(
DISPLAY=:0
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/"$userid"/bus
/usr/bin/notify-send
--icon=face-smile
--urgency=low
-t 5000
-a "'Keys sign'"
"'$title'"
"'$msg'"
)
/usr/bin/su "$user" -c "${cmd[*]}"
if [ "$user" != "liveuser" ]; then
rm /home/"$user"/.config/autostart/key-sign.sh.desktop
rm /home/"$user"/.local/userbin/key-sign.sh
fi
done

View File

@ -2,10 +2,14 @@
sleep 20
plasma-apply-lookandfeel -a "com.github.Melawy.Melawy-round-gray.Nier-A2.desktop" --resetLayout
theme="com.github.Melawy.Melawy-round-gray.Nier-A2.desktop"
plasma-apply-lookandfeel -a "$theme" --resetLayout
notify-send -a "Theme is" "$theme" "$(date '+%Y.%m.%d %H:%M:%S')"
if [ "$(whoami)" != "liveuser" ]; then
sleep 5
rm $HOME/.config/autostart/reset-layout.desktop
rm $HOME/.local/userbin/reset-layout.sh
rm "$HOME/.config/autostart/reset-layout.desktop"
rm "$HOME/.local/userbin/reset-layout.sh"
fi

View File

@ -2,10 +2,14 @@
sleep 20
xdg-settings set default-web-browser firefox.desktop
browser="firefox.desktop"
xdg-settings set default-web-browser "$browser"
notify-send -a "Default browser is" "$browser" "$(date '+%Y.%m.%d %H:%M:%S')"
if [ "$(whoami)" != "liveuser" ]; then
sleep 5
rm $HOME/.config/autostart/set-default-web-browser.desktop
rm $HOME/.local/userbin/set-default-web-browser.sh
rm "$HOME/.config/autostart/set-default-web-browser.desktop"
rm "$HOME/.local/userbin/set-default-web-browser.sh"
fi