mbwallpaper update
parent
1d63afbc07
commit
64668524da
|
@ -29,6 +29,14 @@ case "$setter" in
|
|||
*) echo "Unknown wallpaper setter. Please check your config file $CONFIG_FILE";exit 1;;
|
||||
esac
|
||||
|
||||
#check if wallpaper dir was changed, if so delete wallpaper list
|
||||
if [ ! -f "$CONFIG_DIR/.lastdir" ]; then
|
||||
echo "$wallpaper_dir" > "$CONFIG_DIR/.lastdir"
|
||||
else
|
||||
lastdir=$(<$CONFIG_DIR/.lastdir)
|
||||
[[ "$wallpaper_dir" != "$lastdir" ]] && rm "$WALLPAPERS_LIST" && echo "$wallpaper_dir" > "$CONFIG_DIR/.lastdir"
|
||||
fi
|
||||
|
||||
checkwplist() {
|
||||
# If list does not exist or is empty
|
||||
if [[ ! -f $WALLPAPERS_LIST || $(wc -l <$WALLPAPERS_LIST) -lt 1 ]]; then
|
||||
|
|
Loading…
Reference in New Issue