From f7d1929d01380a062bf46c01e1066ccf8c387a74 Mon Sep 17 00:00:00 2001 From: smayzy Date: Tue, 15 Jul 2025 15:39:10 +0200 Subject: [PATCH] change wallpaper change script to systemd service --- dotfiles/hypr-lap/hyprland.conf | 2 +- modules/home-manager/wm/hyprland.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dotfiles/hypr-lap/hyprland.conf b/dotfiles/hypr-lap/hyprland.conf index 697d6eb..013e828 100644 --- a/dotfiles/hypr-lap/hyprland.conf +++ b/dotfiles/hypr-lap/hyprland.conf @@ -33,7 +33,7 @@ $menu = wofi --show drun exec-once = waybar exec-once = /home/smayzy/.config/hypr/battery.sh -exec = /home/smayzy/.config/hypr/wallpaper.sh +exec-once = systemctl --user start hypr-wallpaper.service exec = killall waybar && waybar exec-once = mako exec-once = systemctl --user start hyprpolkitagent diff --git a/modules/home-manager/wm/hyprland.nix b/modules/home-manager/wm/hyprland.nix index a2f61dd..3107f17 100644 --- a/modules/home-manager/wm/hyprland.nix +++ b/modules/home-manager/wm/hyprland.nix @@ -54,6 +54,19 @@ in }; }) ]; + + systemd.user.services.hypr-wallpaper = { + Unit = { + Description = "Wallpaper auto-changer"; + }; + + Service = { + ExecStart = "${pkgs.bash}/bin/bash /home/smayzy/.config/hypr/wallpaper.sh"; + Restart = "always"; + RestartSec = 10; + }; + }; + }; }