replace notify-sent with echo 🤷
This commit is contained in:
parent
24214e5adb
commit
47e6965b6c
2 changed files with 2 additions and 4 deletions
|
@ -48,7 +48,7 @@ stdenvNoCC.mkDerivation {
|
||||||
wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [libnotify rofi-wayland hyprland]}
|
wrapProgram $out/bin/power-menu --prefix PATH : ${lib.makeBinPath [libnotify rofi-wayland hyprland]}
|
||||||
wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]}
|
wrapProgram $out/bin/tmux-sessions --prefix PATH : ${lib.makeBinPath [tmux kitty rofi-wayland]}
|
||||||
wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick swww]}
|
wrapProgram $out/bin/chpaper --prefix PATH : ${lib.makeBinPath [imagemagick swww]}
|
||||||
wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [libnotify jq curl libsecret]}
|
wrapProgram $out/bin/wallhaven --prefix PATH : ${lib.makeBinPath [jq curl libsecret]}
|
||||||
wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty ytfzf rofi-wayland]}
|
wrapProgram $out/bin/youtube --prefix PATH : ${lib.makeBinPath [kitty ytfzf rofi-wayland]}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ CURL_CMD="${CURL_BASE_CMD} \"${URL}\""
|
||||||
RESULT="$(eval "${CURL_CMD}")"
|
RESULT="$(eval "${CURL_CMD}")"
|
||||||
NO_OF_IMAGES="$(echo "${RESULT}" | jq -r '.meta.total')"
|
NO_OF_IMAGES="$(echo "${RESULT}" | jq -r '.meta.total')"
|
||||||
if [ "${NO_OF_IMAGES}" -eq 0 ]; then
|
if [ "${NO_OF_IMAGES}" -eq 0 ]; then
|
||||||
notify-send -r 1234 -u normal -a Wallpapers -i information -t 5000 "Wallpapers" "No images available for current configuration."
|
echo "No wallpapers available for current configuration" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
RANDOM_ITEM="$(shuf -i 0-$((NO_OF_IMAGES-1)) -n 1 --random-source=/dev/urandom)"
|
RANDOM_ITEM="$(shuf -i 0-$((NO_OF_IMAGES-1)) -n 1 --random-source=/dev/urandom)"
|
||||||
|
@ -86,8 +86,6 @@ if [ "${ITEM_PAGE}" -gt 0 ]; then
|
||||||
CURL_CMD="${CURL_BASE_CMD} \"${URL}${SEED}page=$((ITEM_PAGE+1))\""
|
CURL_CMD="${CURL_BASE_CMD} \"${URL}${SEED}page=$((ITEM_PAGE+1))\""
|
||||||
RESULT="$(eval "${CURL_CMD}")"
|
RESULT="$(eval "${CURL_CMD}")"
|
||||||
fi
|
fi
|
||||||
ID="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].id")"
|
|
||||||
notify-send -r 1234 -u normal -a Wallpapers -i information -t 5000 "Wallpapers" "Got ${NO_OF_IMAGES} images. Using image ${ID} from page $((ITEM_PAGE+1)) ..."
|
|
||||||
IMAGE_URL="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].path")"
|
IMAGE_URL="$(echo "${RESULT}" | jq -r ".data[${ITEM_NUMBER}].path")"
|
||||||
FILENAME="${IMAGE_URL##*/}"
|
FILENAME="${IMAGE_URL##*/}"
|
||||||
curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}"
|
curl --silent -L --output-dir "${DIR}" -o "${FILENAME}" "${IMAGE_URL}"
|
||||||
|
|
Loading…
Reference in a new issue