From b711d9824540c129a84f8386e01c78f8433b0820 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 4 Jul 2024 10:35:23 +0530 Subject: update --- waldl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/waldl b/waldl index 6333590..13384d4 100755 --- a/waldl +++ b/waldl @@ -1,6 +1,6 @@ #!/bin/sh -# https://git.xgenos.me/waldl +# https://git.surgot.tech/waldl # script to find and download wallpapers from wallhaven version="0.0.1" @@ -15,8 +15,9 @@ version="0.0.1" ## User variables ## #################### +[ -z $VIEWER ] && VIEWER=sxiv # the dir where wallpapers are stored -walldir="$HOME/pix/wall" +walldir="$HOME/.local/share/wallhaven" # the dir used to cache thumbnails cachedir="$HOME/.cache/wallhaven" # sxiv options @@ -29,7 +30,7 @@ sorting=relevance # quality : large original small quality=large # atleast : least res -atleast=3840x2160 +atleast=1920x1080 # allow the user to customize the defaults [ -e "$HOME/.config/waldlrc" ] && . "$HOME/.config/waldlrc" @@ -69,7 +70,7 @@ dep_ck () { command -v $pr >/dev/null 2>&1 || sh_info "command $pr not found, install: $pr" 1 done } -dep_ck "sxiv" "curl" "jq" +dep_ck "$VIEWER" "curl" "jq" # clean up command that would be called when the program exits @@ -137,7 +138,7 @@ done | curl -Z -K - ########################### # extract the id's out of the thumbnail name -image_ids="$(sxiv $sxiv_otps "$cachedir")" +image_ids="$($VIEWER $sxiv_otps "$cachedir")" [ -z "$image_ids" ] && exit ######################### @@ -157,4 +158,4 @@ do done | curl -K - sh_info "wallpapers downloaded in:- '$walldir'" -sxiv $(ls -c) +$VIEWER $(ls -c) -- cgit v1.2.3-54-g00ecf