aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/system-user
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-12-25 15:13:13 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-12-25 15:13:13 +0000
commit724b6ccee42ed4de8c15483ab197f3d2f956a995 (patch)
tree53e92846cdf4ae7e742d67bd373cd4028549176f /systemd/system-user
parent59fd10c296ee5fda22226ffd71707ca597f85ed7 (diff)
Add systemd service files
Diffstat (limited to 'systemd/system-user')
-rw-r--r--systemd/system-user/mako.service16
-rw-r--r--systemd/system-user/sway-session.target7
-rw-r--r--systemd/system-user/swayidle.service17
-rw-r--r--systemd/system-user/waybar.service12
4 files changed, 52 insertions, 0 deletions
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
+