From 0b15f70f0de6e6af089cb70090822cd8ccc10c48 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:26 +0100 Subject: 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. --- dot_config/sway/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dot_config/sway/config') diff --git a/dot_config/sway/config b/dot_config/sway/config index c1d897f..808e82d 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -201,8 +201,8 @@ bindsym $mod+t exec ~/.config/sway/tb-toggle.sh # Managed by waybar.service (pulled in via sway-session.target). # ── Autostart ───────────────────────────────────────────────────────────────── -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP -exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP +exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP exec "sleep 2 && ~/.config/sway/display-toggle.sh init" exec systemctl --user start sway-session.target exec ~/.config/sway/tb-autostart.sh -- cgit v1.3.1