add wayland session manager

This commit is contained in:
DanyLE
2025-03-08 21:52:32 +01:00
parent e7fbad271f
commit 4ec5c71110
8 changed files with 205 additions and 4 deletions

View File

@ -0,0 +1,26 @@
#! /bin/sh
handle()
{
echo "SIGINT detected. continue."
}
# start dbus session and get env:
#
# DBUS_SESSION_BUS_ADDRESS='unix:path=/tmp/dbus-...
# export DBUS_SESSION_BUS_ADDRESS;
# DBUS_SESSION_BUS_PID=3598;
# shellcheck disable=SC1091
. /etc/profile
eval "$(dbus-launch --auto-syntax)"
# trap the sigint
trap 'handle' INT
"$@"
# stop the
kill -9 "$DBUS_SESSION_BUS_PID"
echo "Session closed"