From a25bf962ffca153541d1206fcde142092d11a94f Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Thu, 17 Oct 2024 16:35:04 +0200 Subject: [PATCH] BIN: correction de random_wallpaper pour Xorg --- bin/random_wallpaper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/random_wallpaper b/bin/random_wallpaper index 5111ebd..2220311 100755 --- a/bin/random_wallpaper +++ b/bin/random_wallpaper @@ -7,6 +7,7 @@ directory="$HOME/wallpapers" minutes=15 PROGRAM=`which feh` +is_wayland=false # Some tests if [[ "${XDG_SESSION_TYPE}" == "wayland" ]]; then @@ -15,7 +16,7 @@ if [[ "${XDG_SESSION_TYPE}" == "wayland" ]]; then echo "This script needs the swaymsg program." exit 1 fi - wayland=1 + is_wayland=true elif [ -z "${PROGRAM}" ]; then echo "This script needs the feh program. Install it." exit 1 @@ -48,7 +49,7 @@ while true; do # Change background file="${array_files["$NUMBER"]}" - if [[ -n wayland ]]; then + if "${is_wayland}"; then $PROGRAM output "*" bg "$directory/$file" fill else feh --bg-fill "$directory/$file"