There's an active systemd service
[Unit]
Description=Launch the screenlock daemon service
PartOf=graphical-session.target
After=i3wm.service
[Service]
Type=simple
ExecStart=env screenlock-daemon
Restart=on-failure
RestartSec=5
[Install]
WantedBy=graphical-session.target
that starts the daemon script screenlock-daemon
:
#!/usr/bin/env bash
xss-lock --session="${XDG_SESSION_ID}" --ignore-sleep --notifier=notifier --transfer-sleep-lock -- my-locking-command
As per xss-lock, prior to locking it notifies user by running the notifier
script:
#!/usr/bin/env bash
echo "executing at $(date +%R:%S)" >> /tmp/screenlock-notifier-exec # message is logged at
# the expected time.
notify-send --urgency=normal --expire-time=10000 -- 'Locking screen soon...'
Problem is, the notification pop-up is shown with a multi-second delay. Only if a manual notify-send command is sent, it's shown immediately.
Is this something to do with how systemd works, or maybe it's the notification daemon I'm using - dunst?
Running debian testing.