I am just installed pywal. I am trying it in my set background script. When I run my script the first time, pywal works perfectly. But then if I do a consecutive run, it doesn't load the new image. When I run wal it shows me a warning, [W] reload: GTK2 reload support requires Python 2.
This is my script:
#! /bin/sh
bgdir=$XDG_DATA_HOME/backgrounds
bgloc=$XDG_DATA_HOME/backgrounds/wal
if [ "$#" -ne 0 ]; then
loc=$(readlink -f $1)
if [ -f $loc ]; then
cp $loc $bgloc
elif [ -d $loc ]; then
randomimg=$(find "$loc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)
cp $randomimg $bgloc
else
notify-send "Error!" "Not a image or a directory."
exit 1
fi
else
randomimg=$(find "$bgdir" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)
cp $randomimg $bgloc
fi
if command -v wal &> /dev/null; then
wal -i "$bgloc" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun"
fi
nitrogen --save --set-zoom-fill $bgloc
I am just installed pywal. I am trying it in my set background script. When I run my script the first time, pywal works perfectly. But then if I do a consecutive run, it doesn't load the new image. When I run wal it shows me a warning,
[W] reload: GTK2 reload support requires Python 2.
This is my script: