-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd --user support files #3486
Conversation
* adds a sway-session.target that binds to graphical-session.target (see man systemd.special) * also adds a 10-systemd script that should (must?) be included from sway that starts imports the sway environment variables into the systemd --user instance, and then starts sway-session.target The idea is that, any --user units that are wanted by either sway-session.target or graphical-session.target will be started when sway runs, and will have the correct environment from sway too.
This is work-in-progress, comments welcome. |
one example how systemd --user support would be used is, a waybar unit file:
when enabled, this unit would start waybar automatically when sway starts, and stop when graphical-session.target stops. Similarly it could be used for swayidle, if it would support config files … as it is now, it would be weird to edit the unit file to change swayidle options. Alas, I have an example for that too. |
Thank you, but I'd rather not give a preference to any particular init system. This is the sort of thing you should pitch to your Linux distro. |
Instead of sway calling systemctl, you'd want to have it so systemd calls sway, like any other normal service. I don't know whether we want to add optional |
@ascent12 from my research it's not easy to start sway/weston as a --user service from a login manager, yet -- so you'd need to login via agetty (edit: if that even works), which is meh. Otherwise I agree, that would be a nicer approach. |
Let me just formally disagree with the decision here (before I go on with other things):
With that said, I'm off to fight other issues. |
Add this to your config:
|
Maybe the wiki would be a better place for this script? It already has some distro-specific docs there (for Debian/Ubuntu), so I feel like putting init-specific scripts there would make sense. |
+1, wiki would be a great place for this |
(see man systemd.special)
that starts imports the sway environment variables into the systemd
--user instance, and then starts sway-session.target
The idea is that, any --user units that are wanted by either
sway-session.target or graphical-session.target will be started when
sway runs, and will have the correct environment from sway too.