aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/systemd/user/signal.service
blob: f1ea93068255dc2ccf13d7593482f0c7932b3d81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Unit]
Description=Signal Desktop (flatpak)
PartOf=graphical-session.target
Requires=waybar.service
After=graphical-session.target waybar.service
ConditionEnvironment=WAYLAND_DISPLAY

[Service]
Type=simple
# Wait until waybar has registered org.kde.StatusNotifierWatcher on the
# user bus, otherwise Signal launches without a tray icon and there is
# no way to raise the window.
ExecStartPre=/bin/sh -c 'for _ in $(seq 1 60); do busctl --user --timeout=1 status org.kde.StatusNotifierWatcher >/dev/null 2>&1 && exit 0; sleep 0.5; done; exit 1'
ExecStart=/usr/bin/flatpak run org.signal.Signal --start-in-tray
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=sway-session.target