summarylogtreecommitdiffstats
path: root/0006-start-stop-graphical-session.target.patch
blob: aa6e9319779040b8eec942375edce1df94091389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 20b911105f35402eab064ca9f2d7248ed5b1a3ec Mon Sep 17 00:00:00 2001
From: ArenM <aren@peacevolution.org>
Date: Fri, 22 Apr 2022 18:24:27 -0400
Subject: [PATCH sxmo-utils 6/6] start / stop graphical-session.target

---
 configs/default_hooks/sxmo_hook_service.sh | 2 ++
 configs/services/sxmo-session.target       | 6 ++++++
 2 files changed, 8 insertions(+)
 create mode 100644 configs/services/sxmo-session.target

diff --git a/configs/default_hooks/sxmo_hook_service.sh b/configs/default_hooks/sxmo_hook_service.sh
index f744659..5d25c68 100644
--- a/configs/default_hooks/sxmo_hook_service.sh
+++ b/configs/default_hooks/sxmo_hook_service.sh
@@ -52,8 +52,10 @@ case "$MANAGER" in
 		case "$1" in
 			sxmo_starting)
 				printenv | cut -d '=' -f 1 | xargs systemctl --user import-environment
+				systemctl --user start sxmo-session.target
 				;;
 			sxmo_stopping)
+				systemctl --user stop graphical-session.target
 				systemctl --user unset-environment \
 					WAYLAND_DISPLAY DISPLAY SXMO_WM XDG_CURRENT_DESKTOP
 				;;
diff --git a/configs/services/sxmo-session.target b/configs/services/sxmo-session.target
new file mode 100644
index 0000000..1bea6c3
--- /dev/null
+++ b/configs/services/sxmo-session.target
@@ -0,0 +1,6 @@
+[Unit]
+Description=Graphical sxmo session
+Documentation=man:systemd.special
+BindsTo=graphical-session.target
+Wants=graphical-session-pre.target
+After=graphical-session-pre.target
-- 
2.45.0