domizianie

This commit is contained in:
2021-07-07 23:44:05 +02:00
parent 1acfd0bb41
commit 94c1f95a4c
10 changed files with 379 additions and 20 deletions

26
.config/sway/bin/session.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
VARIABLES="DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE _JAVA_AWT_WM_NONREPARENTING"
SESSION_TARGET="sway-session.target"
if hash dbus-update-activation-environment 2>/dev/null; then
dbus-update-activation-environment --systemd $VARIABLES
fi
systemctl --user import-environment $VARIABLES
systemctl --user start "$SESSION_TARGET"
if [ "$1" != "--with-cleanup" ] ||
[ -z "$SWAYSOCK" ] ||
! hash swaymsg 2>/dev/null
then
exit 0;
fi
swaymsg -t subscribe '["shutdown"]'
systemctl --user stop "$SESSION_TARGET"
systemctl --user unset-environment $VARIABLES