You are not logged in.
Setup: Arch, KDE Plasma 6.3.1 and Wayland.
I control Night Light with simple scripts.
disable_night_light.sh
#!/usr/bin/env bash
if [ $(qdbus6 org.kde.KWin.NightLight /org/kde/KWin/NightLight org.kde.KWin.NightLight.running) = true ]; then
qdbus6 org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "Toggle Night Color"
fiI wanted to make a systemd service that automatically runs the script above when I start my PC.
I have tried multiple (both simple and complicated) combinations of configurations, but the current .service is as follows.
cat /etc/systemd/user/disable_night_light.service
[Unit]
Description=Making sure night light is not on during startup
PartOf=graphical-session.target
After=graphical-session.target
Requires=graphical-session.target
[Service]
Type=exec
ExecStart=/home/user/scripts/disable_night_light.sh
[Install]
WantedBy=graphical-session.targetManually running systemctl --user start disable_night_light has worked with a lot of different configurations, but none of them work on actual startup after enabling the service.
Output from the failed attempts
Mar 03 10:01:19 host disable_night_light.sh[1118]: Service 'org.kde.KWin.NightLight' does not exist.
Mar 03 10:01:19 host disable_night_light.sh[1114]: /home/user/scripts/disable_night_light.sh: line 7: [: =: unary operator expectedMy understanding is that I need to get the service to wait until Service 'org.kde.KWin.NightLight' has started, but I'm unable to figure out a way to do so.
I can't find any systemd unit that looks like it has anything to do with org.kde.KWin*.
Offline
https://userbase.kde.org/System_Settings/Autostart
Why not just use kde to start this? Why use systemd?
Offline