From 0d14fd9136d7dbd731b02ce8501ff725f11b71cc Mon Sep 17 00:00:00 2001 From: jrun Date: Thu, 5 Jan 2023 14:17:55 -0500 Subject: add systemd support (#1253) * add systemd support motivation for this is is proper ordering of related/bound/required services to Hyprland (e.g. swaybg) that would need to have a compositor ready. this could possibly be a build-time option of course. see also: example/ files for example of services Signed-off-by: Paymon MARANDI * nix: add withSystemd flag Signed-off-by: Paymon MARANDI Co-authored-by: Mihai Fufezan Co-authored-by: Vaxerski --- example/hyprland.service | 12 ++++++++++++ example/swaybg@.service | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 example/hyprland.service create mode 100644 example/swaybg@.service (limited to 'example') diff --git a/example/hyprland.service b/example/hyprland.service new file mode 100644 index 00000000..1ff479bb --- /dev/null +++ b/example/hyprland.service @@ -0,0 +1,12 @@ +; a primitive systemd --user example +[Unit] +Description = %p +BindsTo = graphical-session.target +Upholds = swaybg@333333.service + +[Service] +Type = notify +ExecStart = /usr/bin/Hyprland + +[Install] +WantedBy = default.target diff --git a/example/swaybg@.service b/example/swaybg@.service new file mode 100644 index 00000000..0636625d --- /dev/null +++ b/example/swaybg@.service @@ -0,0 +1,13 @@ +; a primitive systemd --user example +; see example/hyprland.service for more details +[Unit] +Description = %p +BindsTo = hyprland.service +Wants = hyprland.service +After = hyprland.service + +[Service] +ExecStart = /usr/bin/swaybg --color #%i + +[Install] +WantedBy = default.target -- cgit v1.2.3