From f3f7d3629a632682b1b3acf800f0b5fb10cd48f4 Mon Sep 17 00:00:00 2001 From: izmyname <135810812+izmyname@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:49:00 +0500 Subject: Build with hyprland-session.service (#8251) Co-authored-by: Mihai Fufezan --- systemd/hyprland-session.service.in | 16 ++++++++++++++++ systemd/hyprland-systemd.desktop | 5 +++++ systemd/meson.build | 15 +++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 systemd/hyprland-session.service.in create mode 100644 systemd/hyprland-systemd.desktop create mode 100644 systemd/meson.build (limited to 'systemd') diff --git a/systemd/hyprland-session.service.in b/systemd/hyprland-session.service.in new file mode 100644 index 00000000..dafdc141 --- /dev/null +++ b/systemd/hyprland-session.service.in @@ -0,0 +1,16 @@ +[Unit] +Description=Hyprland - Tiling compositor with the looks +Documentation=man:Hyprland(1) +BindsTo=graphical-session.target +Before=graphical-session.target +Wants=xdg-desktop-autostart.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target + +[Service] +Type=notify +ExecStart=@PREFIX@/@BINDIR@/Hyprland +ExecStop=@PREFIX@/@BINDIR@/hyprctl dispatch exit +ExecStopPost=systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP +Restart=on-failure +Slice=session.slice diff --git a/systemd/hyprland-systemd.desktop b/systemd/hyprland-systemd.desktop new file mode 100644 index 00000000..b36a87b2 --- /dev/null +++ b/systemd/hyprland-systemd.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Hyprland +Comment=An intelligent dynamic tiling Wayland compositor +Exec=systemctl --user start --wait hyprland-session +Type=Application diff --git a/systemd/meson.build b/systemd/meson.build new file mode 100644 index 00000000..497e64f4 --- /dev/null +++ b/systemd/meson.build @@ -0,0 +1,15 @@ +install_data( + 'hyprland-systemd.desktop', + install_dir: join_paths(get_option('datadir'), 'wayland-sessions'), + install_tag: 'runtime', +) + +conf_data = configuration_data() +conf_data.set('PREFIX', get_option('prefix')) +conf_data.set('BINDIR', get_option('bindir')) + +configure_file( + configuration: conf_data, + input: 'hyprland-session.service.in', + output: '@BASENAME@', + install_dir: join_paths(get_option('libdir'), 'systemd/user') ) -- cgit v1.2.3