welcome: random wall

This commit is contained in:
end-4
2025-06-17 10:49:11 +02:00
parent 8419697542
commit 745857e515
3 changed files with 41 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
mkdir -p ~/Pictures/Wallpapers
page=$((1 + RANDOM % 1000));
response=$(curl "https://konachan.com/post.json?tags=rating%3Asafe&limit=1&page=$page")
link=$(echo "$response" | jq '.[0].file_url' -r);
ext=$(echo "$link" | awk -F. '{print $NF}')
downloadPath="$HOME/Pictures/Wallpapers/konachan_random_image.$ext"
curl "$link" -o "$downloadPath"
~/.config/quickshell/scripts/colors/switchwall.sh --image "$downloadPath"
@@ -291,6 +291,10 @@ main() {
shift
fi
;;
--image)
imgpath="$2"
shift 2
;;
--noswitch)
noswitch_flag="1"
imgpath=$(swww query | awk -F 'image: ' '{print $2}')