Waybar starts before wlsunset (due to ExecStartPre sleep) and only checks the service status once. ExecStartPost sends SIGRTMIN+11 so waybar refreshes the nightlight module after wlsunset is ready.
21 lines
624 B
Desktop File
21 lines
624 B
Desktop File
# ABOUTME: systemd user service for wlsunset night light (blue light filter).
|
|
# ABOUTME: Starts after kanshi to ensure all outputs are configured.
|
|
|
|
[Unit]
|
|
Description=Wlsunset night light (blue light filter)
|
|
Documentation=man:wlsunset(1)
|
|
PartOf=graphical-session.target
|
|
After=graphical-session.target kanshi.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
# Give kanshi time to configure all outputs before wlsunset captures them
|
|
ExecStartPre=/bin/sleep 2
|
|
ExecStart=/usr/bin/wlsunset -T 6500 -t 5000 -S 00:00 -s 00:01
|
|
ExecStartPost=/usr/bin/pkill -RTMIN+11 waybar
|
|
Restart=on-failure
|
|
RestartSec=3
|
|
|
|
[Install]
|
|
WantedBy=graphical-session.target
|