fix(xorg): check for directory in wallpaper script

This commit is contained in:
Patrick 2023-09-16 22:10:00 +02:00
parent 2a34aeeb08
commit 719dbd354f
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -7,10 +7,12 @@
exe =
pkgs.writeShellScript "set-wallpaper"
''
for D in /tmp/.X11-unix/*; do
file=$(${pkgs.coreutils}/bin/basename $D)
DISPLAY=":''${file:1}" ${pkgs.feh}/bin/feh --bg-fill --randomize --recursive ${wallpaper-folder}/
done
if [ -d "/tmp/.X11-unix; then
for D in /tmp/.X11-unix/*; do
file=$(${pkgs.coreutils}/bin/basename $D)
DISPLAY=":''${file:1}" ${pkgs.feh}/bin/feh --bg-fill --randomize --recursive ${wallpaper-folder}/
done
fi
'';
in {
systemd.user = {