From 724b6ccee42ed4de8c15483ab197f3d2f956a995 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Wed, 25 Dec 2024 15:13:13 +0000 Subject: Add systemd service files --- systemd/system-user/mako.service | 16 ++++++++++++++++ systemd/system-user/sway-session.target | 7 +++++++ systemd/system-user/swayidle.service | 17 +++++++++++++++++ systemd/system-user/waybar.service | 12 ++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 systemd/system-user/mako.service create mode 100644 systemd/system-user/sway-session.target create mode 100644 systemd/system-user/swayidle.service create mode 100644 systemd/system-user/waybar.service (limited to 'systemd/system-user') diff --git a/systemd/system-user/mako.service b/systemd/system-user/mako.service new file mode 100644 index 0000000..0afbfb9 --- /dev/null +++ b/systemd/system-user/mako.service @@ -0,0 +1,16 @@ +[Unit] +Description=Lightweight Wayland notification daemon +Documentation=man:mako(1) +PartOf=graphical-session.target +After=graphical-session.target + +[Service] +Type=dbus +BusName=org.freedesktop.Notifications +ExecCondition=/bin/sh -c '[ -n "$WAYLAND_DISPLAY" ]' +ExecStart=/usr/bin/mako +ExecReload=/usr/bin/makoctl reload + +[Install] +WantedBy=sway-session.target + diff --git a/systemd/system-user/sway-session.target b/systemd/system-user/sway-session.target new file mode 100644 index 0000000..db94967 --- /dev/null +++ b/systemd/system-user/sway-session.target @@ -0,0 +1,7 @@ +[Unit] +Description=sway compositor session +Documentation=man:systemd.special(7) +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target + diff --git a/systemd/system-user/swayidle.service b/systemd/system-user/swayidle.service new file mode 100644 index 0000000..ce9f7e3 --- /dev/null +++ b/systemd/system-user/swayidle.service @@ -0,0 +1,17 @@ +[Unit] +Description=Idle manager for Wayland +Documentation=man:swayidle(1) +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/swayidle -w \ + timeout 300 "notify-send 'Power' 'System will suspend very soon due to inactivity.'" \ + timeout 315 "swaylock" \ + timeout 320 "swaymsg 'output * power off'" resume "swaymsg 'output * power on'" \ + before-sleep "swaylock" + + +[Install] +WantedBy=sway-session.target + diff --git a/systemd/system-user/waybar.service b/systemd/system-user/waybar.service new file mode 100644 index 0000000..db1c594 --- /dev/null +++ b/systemd/system-user/waybar.service @@ -0,0 +1,12 @@ +[Unit] +Description=Highly customizable Wayland bar for Sway and Wlroots based compositors. +Documentation=https://github.com/Alexays/Waybar/wiki/ +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/waybar + +[Install] +WantedBy=sway-session.target + -- cgit v1.2.3-70-g09d2