aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-02-19 15:13:50 -0800
committerTrumeet <yuuta@yuuta.moe>2022-02-19 15:13:50 -0800
commit326abc4339ad60799c02b4cc3fdd33a670dcd0f6 (patch)
tree5a12b9c948a7b27ede2111ec5ebc09508dab9c55
parent938d888adede09af70929a34a6242309622e8cdd (diff)
downloadgists-326abc4339ad60799c02b4cc3fdd33a670dcd0f6.tar
gists-326abc4339ad60799c02b4cc3fdd33a670dcd0f6.tar.gz
gists-326abc4339ad60799c02b4cc3fdd33a670dcd0f6.tar.bz2
gists-326abc4339ad60799c02b4cc3fdd33a670dcd0f6.zip
Use Alias for services so I can replace them
-rw-r--r--SystemdGraphicalSession/README.md10
-rw-r--r--SystemdGraphicalSession/deadd-notification-center.service3
-rw-r--r--SystemdGraphicalSession/gui-session.target (renamed from SystemdGraphicalSession/i3-session.target)6
-rw-r--r--SystemdGraphicalSession/i3.service3
-rw-r--r--SystemdGraphicalSession/xcompmgr.service3
-rwxr-xr-xSystemdGraphicalSession/xinitrc2
6 files changed, 18 insertions, 9 deletions
diff --git a/SystemdGraphicalSession/README.md b/SystemdGraphicalSession/README.md
index 405b373..b82668f 100644
--- a/SystemdGraphicalSession/README.md
+++ b/SystemdGraphicalSession/README.md
@@ -3,17 +3,17 @@
An experiment of using systemd/User to start and manage i3wm, xcompmgr, XDG Autostart and user programs.
graphical-session.target
- -> i3-session.target
- -> i3.service # i3wm (slice: session)
- -> xcompmgr.service # Compositor (slice: session)
+ -> gui-session.target
+ -> window-manager.service # Window Manager (alias: i3.service, slice: session)
+ -> compositor.service # Compositor (alias: xcompmgr, slice: session)
-> xdg-desktop-autostart.target # XDG Autostart (slice: app. In fact daemons like blueman-applet should be in background slice)
-> xrdb.service # xrdb merge
- -> deadd-notification-center.service # libnotify daemon (slice: app)
+ -> notification-daemon.service # libnotify daemon (alias: deadd-notification-center, slice: app)
User programs (e.g. xterm, rofi and their children) are started under separate scopes. I'm not sure if that's light enough.
Environment variables are managed by `environment.d(5)`.
-To start: `systemctl --user start --wait i3-session.target` (put in your `.xinitrc`).
+To start: `systemctl --user start --wait gui-session.target` (put in your `.xinitrc`).
To be continued. This configuration has flaws.
diff --git a/SystemdGraphicalSession/deadd-notification-center.service b/SystemdGraphicalSession/deadd-notification-center.service
index 3dc8f24..bae16cb 100644
--- a/SystemdGraphicalSession/deadd-notification-center.service
+++ b/SystemdGraphicalSession/deadd-notification-center.service
@@ -7,3 +7,6 @@ Documentation=man:deadd-notification-center(8)
[Service]
Type=simple
ExecStart=/usr/bin/deadd-notification-center
+
+[Install]
+Alias=notification-daemon.service
diff --git a/SystemdGraphicalSession/i3-session.target b/SystemdGraphicalSession/gui-session.target
index 5de5136..b66cf0b 100644
--- a/SystemdGraphicalSession/i3-session.target
+++ b/SystemdGraphicalSession/gui-session.target
@@ -1,9 +1,9 @@
[Unit]
Description=i3 Session
BindsTo=graphical-session.target
-Wants=i3.service
+Wants=window-manager.service
Wants=xdg-desktop-autostart.target
Wants=xrdb.service
-Wants=deadd-notification-center.service
-Wants=xcompmgr.service
+Wants=notification-daemon.service
+Wants=compositor.service
Wants=xbindkeys.service
diff --git a/SystemdGraphicalSession/i3.service b/SystemdGraphicalSession/i3.service
index 1d2f7a2..4277558 100644
--- a/SystemdGraphicalSession/i3.service
+++ b/SystemdGraphicalSession/i3.service
@@ -9,3 +9,6 @@ Slice=session.slice
Type=simple
ExecStart=/usr/bin/i3
ExecStop=/usr/bin/sh -c '/usr/bin/i3-msg exit || true'
+
+[Install]
+Alias=window-manager.service
diff --git a/SystemdGraphicalSession/xcompmgr.service b/SystemdGraphicalSession/xcompmgr.service
index 16cfbcb..dd9394e 100644
--- a/SystemdGraphicalSession/xcompmgr.service
+++ b/SystemdGraphicalSession/xcompmgr.service
@@ -8,3 +8,6 @@ Documentation=man:xcompmgr(8)
Slice=session.slice
Type=simple
ExecStart=/usr/bin/xcompmgr
+
+[Install]
+Alias=compositor.service
diff --git a/SystemdGraphicalSession/xinitrc b/SystemdGraphicalSession/xinitrc
index 5443329..c5e8d71 100755
--- a/SystemdGraphicalSession/xinitrc
+++ b/SystemdGraphicalSession/xinitrc
@@ -1,2 +1,2 @@
#!/bin/sh
-exec systemctl --user start --wait i3-session.target
+exec systemctl --user start --wait gui-session.target