aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:26 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:26 +0100
commit0b15f70f0de6e6af089cb70090822cd8ccc10c48 (patch)
tree9ffd289c461900d86141a9bf8c5debccbfb67939 /dot_config/systemd/user
parent41b4bfd9bcc2bab54abfd0b6d9995118884d5e61 (diff)
downloaddotfiles-0b15f70f0de6e6af089cb70090822cd8ccc10c48.tar.gz
dotfiles-0b15f70f0de6e6af089cb70090822cd8ccc10c48.tar.bz2
dotfiles-0b15f70f0de6e6af089cb70090822cd8ccc10c48.zip
fix(signal): import XDG_SESSION_TYPE/DESKTOP into user systemd + clean stop
Two issues with the sway autostart of signal.service: 1. Electron picks its tray backend from XDG_SESSION_TYPE and XDG_SESSION_DESKTOP. The sway config only imported DISPLAY, WAYLAND_DISPLAY, SWAYSOCK and XDG_CURRENT_DESKTOP into the systemd user manager, so services launched there got a partial env and Electron registered no SNI tray icon. Worked when launched from a terminal (which inherits sway's full env, including the bits set by pam_systemd). Add the two missing variables to both systemctl import-environment and dbus-update-activation-environment. 2. With minimize-to-tray on, Electron treats SIGTERM as a window-close and just hides the window, so 'systemctl --user stop signal' did nothing visible until the 90s default timeout SIGKILLed. Switch to ExecStop=flatpak kill org.signal.Signal, which uses flatpak's own instance manager to actually terminate the sandboxed app, plus a short TimeoutStopSec as a safety net.
Diffstat (limited to 'dot_config/systemd/user')
-rw-r--r--dot_config/systemd/user/signal.service5
1 files changed, 5 insertions, 0 deletions
diff --git a/dot_config/systemd/user/signal.service b/dot_config/systemd/user/signal.service
index 80d25f2..264eb6e 100644
--- a/dot_config/systemd/user/signal.service
+++ b/dot_config/systemd/user/signal.service
@@ -7,8 +7,13 @@ ConditionEnvironment=WAYLAND_DISPLAY
[Service]
Type=simple
ExecStart=/usr/bin/flatpak run org.signal.Signal --start-in-tray
+# Electron + "minimize to tray" turns SIGTERM into a window-close which
+# hides instead of exits, so systemd would wait for the stop timeout
+# before SIGKILLing. Use flatpak's instance manager to kill it directly.
+ExecStop=/usr/bin/flatpak kill org.signal.Signal
Restart=on-failure
RestartSec=5s
+TimeoutStopSec=10s
[Install]
WantedBy=sway-session.target