Update wallpaper service

Run swaybg directly, since using setbg script runs it detached, and
while it's possible to just set `RemainAfterExit=true`, this makes
things needlessly annoying and confusing.
This commit is contained in:
ItsDrike 2023-01-25 18:19:13 +01:00
parent 948bb3be6b
commit 746e79aa30
No known key found for this signature in database
GPG key ID: B014E761034AF742
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@
################# #################
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
exec-once = systemctl --user start wm-ready.target exec-once = systemctl --user start wm-ready.target
exec-once = sleep 2 && eww open bar0 exec-once = sleep 2 && eww open bar0

View file

@ -3,9 +3,9 @@ Description="Wallpaper setter"
PartOf=graphical-session.target PartOf=graphical-session.target
[Service] [Service]
ExecStart=%h/.local/bin/scripts/gui/setbg Environment=WALLPAPER_IMAGE=%h/.local/share/background
Type=oneshot ExecStart=/usr/bin/swaybg --image $WALLPAPER_IMAGE
RemainAfterExit=false Restart=always
[Install] [Install]
WantedBy=wm-ready.target WantedBy=wm-ready.target