You are not logged in.
I'm making a logout script because I hate the fact that when I logout the apps don't minimize or close before loggin out (not all of them at least) and the background doesn't show properly.
I have already made a script that works for shutdown and reboot, simply detect the runlevel, stop the shutdown, wmctrl to show the desktop and start shutting down or rebooting again (based on the runlevel), but I can't find a way to do the same for logout. Also I can't find where can I change the default logout script (if it exist, I'm relatively new to linux but love tinkering with everything I can), and if is also possible to do the same for shutdown or rebooting, then please them how
Offline
Which distribution are you trying this on exactly? Neither KDE4 nor normal runlevels are concepts that exist on a current Arch install.
Last edited by V1del (2021-11-13 01:01:10)
Offline
Arch, if it helps, I installed arch forking ArchTitus (an installer script for arch) and making it use lvm and uninstalling some packages, the rest is untouched.
The logout script is the following:
#!/bin/zsh
runlevel=$(systemctl get-default)
shutdown -c
wmctrl -k on
for scrn in $(screen -list | sed -En "s/[ \t]*([0-9]+\.[^\t^ ]*).*/\1/p"); do
screen -XS $scrn kill
done
if [[ $runlevel == "poweroff.target" ]]; then
shutdown -P
elif [[ $runlevel == "reboot.target" ]];
shutdown -r
else
loginctl terminate-session "$(loginctl session-status | head -n 1 | awk '{print $1}')"
fi
screen -wipe
Last edited by DeadKper (2021-11-13 01:47:47)
Offline
Actually. the output of "pacman -Q | grep kde" is:
kde-cli-tools 5.23.3-1
kde-gtk-config 5.23.3-1
kdeclarative 5.87.0-1
kdeconnect 21.08.3-1
kdecoration 5.23.3-1
kded 5.87.0-1
kdelibs4support 5.87.0-1
kdesu 5.87.0-1
libblockdev 2.26-1
polkit-kde-agent 5.23.3-1
qt5-base 5.15.2+kde+r254-1
qt5-declarative 5.15.2+kde+r36-1
qt5-quickcontrols2 5.15.2+kde+r8-1
qt5-svg 5.15.2+kde+r13-1
qt5-tools 5.15.2+kde+r17-3
qt5-wayland 5.15.2+kde+r36-1
xdg-desktop-portal-kde 5.23.3-1
But there is a .kde4 folder in my home folder so I assume it was kde4
Last edited by DeadKper (2021-11-13 02:25:22)
Offline