ai_art_filter
This commit is contained in:
parent
1584b8dce7
commit
828c886daa
1 changed files with 7 additions and 2 deletions
|
@ -16,7 +16,12 @@ mkdir -p "${DIR}"
|
||||||
|
|
||||||
CONFIG_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
CONFIG_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}"
|
||||||
if [ ! -e ${CONFIG_DIR}/wallpaper_config.json ]; then
|
if [ ! -e ${CONFIG_DIR}/wallpaper_config.json ]; then
|
||||||
echo '{"tags":null,"categories":"100","purity":"100", "sorting":"random", "size":null, "ratios":null, "colors":null}' | jq > ${CONFIG_DIR}/wallpaper_config.json
|
echo '{"tags":null,"categories":"100","purity":"100", "sorting":"random", "size":null, "ratios":null, "colors":null, "ai_filter":1}' | jq > ${CONFIG_DIR}/wallpaper_config.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
AI_FILTER="$(cat ${CONFIG_DIR}/wallpaper_config.json | jq -r '.ai_filter // empty')"
|
||||||
|
if [ -n "${AI_FILTER}" ]; then
|
||||||
|
AI_FILTER="ai_art_filter=${AI_FILTER}&"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAGS="$(cat ${CONFIG_DIR}/wallpaper_config.json | jq -r '.tags // empty')"
|
TAGS="$(cat ${CONFIG_DIR}/wallpaper_config.json | jq -r '.tags // empty')"
|
||||||
|
@ -55,7 +60,7 @@ if [ -n "${SORTING}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notify-send -r 9897 -i information -t 1000 "Wallpapers" "Downloading..."
|
notify-send -r 9897 -i information -t 1000 "Wallpapers" "Downloading..."
|
||||||
URL="${WALLHAVEN_BASE_URL}/search?${TAGS}${CATEGORIES}${PURITY}${SIZE}${RATIOS}${COLORS}${SORTING}"
|
URL="${WALLHAVEN_BASE_URL}/search?${TAGS}${CATEGORIES}${PURITY}${SIZE}${RATIOS}${COLORS}${AI_FILTER}${SORTING}"
|
||||||
CURL_CMD="${CURL_BASE_CMD} \"${URL}\""
|
CURL_CMD="${CURL_BASE_CMD} \"${URL}\""
|
||||||
ID="$(eval ${CURL_CMD} | jq -r '.data[0].id')"
|
ID="$(eval ${CURL_CMD} | jq -r '.data[0].id')"
|
||||||
CURL_CMD="${CURL_BASE_CMD} \"${WALLHAVEN_BASE_URL}/w/${ID}\""
|
CURL_CMD="${CURL_BASE_CMD} \"${WALLHAVEN_BASE_URL}/w/${ID}\""
|
||||||
|
|
Loading…
Reference in a new issue