summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--dot_config/systemd/user/sway-session.target2
-rw-r--r--systemd-units/user.txt2
-rw-r--r--tests/test_host_autostart.py19
3 files changed, 20 insertions, 3 deletions
diff --git a/dot_config/systemd/user/sway-session.target b/dot_config/systemd/user/sway-session.target
index e05f2b6..9603e21 100644
--- a/dot_config/systemd/user/sway-session.target
+++ b/dot_config/systemd/user/sway-session.target
@@ -2,5 +2,5 @@
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
-Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service waybar.service signal.service mattermost.service nheko@personal.service nheko@work.service whatsie.service
+Wants=graphical-session-pre.target mako.service poweralertd.service display-watcher.service swayidle.service cliphist-text.service cliphist-image.service waybar.service signal.service nheko@personal.service whatsie.service
After=graphical-session-pre.target
diff --git a/systemd-units/user.txt b/systemd-units/user.txt
index 56ba704..71a37b0 100644
--- a/systemd-units/user.txt
+++ b/systemd-units/user.txt
@@ -9,9 +9,7 @@ display-watcher.service
inhibridge.service
keybase-gui.service
mako.service
-mattermost.service
nheko@personal.service
-nheko@work.service
pass-secret-service.service
poweralertd.service
signal.service
diff --git a/tests/test_host_autostart.py b/tests/test_host_autostart.py
new file mode 100644
index 0000000..632f1cf
--- /dev/null
+++ b/tests/test_host_autostart.py
@@ -0,0 +1,19 @@
+import unittest
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parents[1]
+
+
+class HostAutostartTests(unittest.TestCase):
+ def test_work_chat_is_not_started_by_sway(self):
+ units = (ROOT / "systemd-units/user.txt").read_text()
+ target = (ROOT / "dot_config/systemd/user/sway-session.target").read_text()
+ for content in (units, target):
+ self.assertNotIn("mattermost.service", content)
+ self.assertNotIn("nheko@work.service", content)
+ self.assertIn("nheko@personal.service", content)
+ self.assertTrue((ROOT / "dot_config/systemd/user/mattermost.service").exists())
+ for app in ("mattermost", "nheko"):
+ self.assertTrue(
+ (ROOT / f"dot_config/autostart/dotfiles-{app}.desktop").exists()
+ )