From ffb75b8892c8bdbec39af50d17d1a716b594a9cf Mon Sep 17 00:00:00 2001 From: Pavel Egorov Date: Tue, 16 Dec 2025 04:59:10 +0300 Subject: [systemd] extract waybar, dunst, swaybg and swayidle from niri config into systemd services --- .config/niri/config.kdl | 5 ----- .config/systemd/user/swaybg.service | 12 ++++++++++++ .config/systemd/user/swayidle.service | 12 ++++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .config/systemd/user/swaybg.service create mode 100644 .config/systemd/user/swayidle.service (limited to '.config') diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 73e8c66..cc2efef 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -15,13 +15,8 @@ include "windows.kdl" // which may be more convenient to use. // See the binds section below for more spawn examples. -// This line starts waybar, a commonly used bar for Wayland compositors. -spawn-at-startup "waybar" -spawn-at-startup "dunst" -spawn-sh-at-startup "swaybg --image ~/.config/wallpaper" spawn-sh-at-startup "vicinae server" spawn-sh-at-startup "gammastep" -spawn-at-startup "swayidle -w" // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" diff --git a/.config/systemd/user/swaybg.service b/.config/systemd/user/swaybg.service new file mode 100644 index 0000000..4a7903c --- /dev/null +++ b/.config/systemd/user/swaybg.service @@ -0,0 +1,12 @@ +[Unit] +Description=Wallpaper utility for Wayland +After=graphical-session.target +PartOf=graphical-session.target +Requisite=graphical-session.target + +[Install] +WantedBy=niri.service + +[Service] +ExecStart=/usr/bin/swaybg --image "%h/.config/wallpaper" +Restart=on-failure diff --git a/.config/systemd/user/swayidle.service b/.config/systemd/user/swayidle.service new file mode 100644 index 0000000..3f4397c --- /dev/null +++ b/.config/systemd/user/swayidle.service @@ -0,0 +1,12 @@ +[Unit] +Description=Idle management daemon for Wayland +After=graphical-session.target +PartOf=graphical-session.target +Requisite=graphical-session.target + +[Install] +WantedBy=niri.service + +[Service] +ExecStart=/usr/bin/swayidle -w +Restart=on-failure -- cgit v1.3