As per systemd.special(7)[0] graphical-session-pre.target is strictly
for units that set up things for a graphical session. Most notably,
these are usually started *before* the compositor/session is actually
ready.
While Home Manager's current implementation of graphical-session.target
allows these units to work regardless of what systemd.special(7)
specifies, other setups like ones with uwsm[1] do not allow these units
to start properly.
[0]: https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#graphical-session-pre.target
[1]: https://github.com/Vladimir-csp/uwsm
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
To avoid this kind of message:
swayidle[181123]: - [Line 1054] Unable to connect to the compositor. If your compositor is running, check or set the WAYLAND_DISPLAY environment variable.
Occasionally, swayidle crashes with a failure to connect to the
Wayland session. Ideally, swayidle should automatically restart
instead of leaving the system in a vulnerable state.
swayidle executes commands using "sh -c" and so its PATH must contain
a shell. This adds such PATH entry to the environment of the systemd
service.
Fixes#2811.
Swayidle is an idle management daemon for Wayland. This modules adds support for
running swayidle as a SystemD user unit and makes it configurable through
home-manager.