Replies: 1 comment 1 reply
-
Depends on how complex you want to get. There is hyprland-systemd.desktop with hyprland-session.service in examples. I don't see why it wouldn't work, though if you e.g. change your PATH somewhere in your shell's You don't have to run hyprland as a service though. In the simplest case you want some # ~/.config/systemd/user/hyprland-session.target
[Unit]
# ...
BindsTo=graphical-session.target
# ... to be launched when hyprland is ready (WAYLAND_DISPLAY etc is set, systemd / dbus environment is updated, so all your waybars won't crash on launch). (you can't start e.g. exec-once = sleep 5s && systemctl --user start hyprland-session.target (sleep is for variables to be updated) And exec-shutdown = systemctl --user stop hyprland-session.target so that all units with That's the gist of it. In practice, you might not want this delay, and would prefer to update variables yourself (or with some other script). For that there is uwsm, which does, seemingly, everything, but is huge (haven't tried it). Or you could look at how sway-systemd's session.sh and units do it, and adapt for hyprland, which is what I did. Basically
Also, might be of interest: |
Beta Was this translation helpful? Give feedback.
-
This means desktop-portal-hyprland doesn't auto start. I'm on arch & up to date, how can I become graphical?
Beta Was this translation helpful? Give feedback.
All reactions