summaryrefslogtreecommitdiff
path: root/.local/bin/waldl
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/waldl')
-rwxr-xr-x.local/bin/waldl20
1 files changed, 10 insertions, 10 deletions
diff --git a/.local/bin/waldl b/.local/bin/waldl
index 1957354..48f8fa9 100755
--- a/.local/bin/waldl
+++ b/.local/bin/waldl
@@ -7,9 +7,9 @@ version="0.0.1"
# Usage:
# waldl <query>
# if query left empty then sh_menu will be used (dmenu by default)
-# after the thumbnails are cached, sxiv would open up with the thumbnails
-# Select the wallpapers using `m` on the image. ( marking the image in sxiv )
-# press `q` to quit sxiv, the marked images would start downloading
+# after the thumbnails are cached, nsxiv would open up with the thumbnails
+# Select the wallpapers using `m` on the image. ( marking the image in nsxiv )
+# press `q` to quit nsxiv, the marked images would start downloading
####################
## User variables ##
@@ -19,8 +19,8 @@ version="0.0.1"
walldir="$HOME/pix/wallhaven"
# the dir used to cache thumbnails
cachedir="$HOME/.cache/wallhaven"
-# sxiv options
-sxiv_otps=" -tfpo -z 200" # o is needed for selection
+# nsxiv options
+nsxiv_otps=" -tfpo -z 200" # o is needed for selection
# number of pages to show in search results
# each page contains 24 results
max_pages=4
@@ -66,7 +66,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 "nsxiv" "curl" "jq"
# clean up command that would be called when the program exits
@@ -109,7 +109,7 @@ sh_info "getting data..."
get_results "$query"
# check if data file is empty, if so then exit
-[ -s "$datafile" ] || sh_info "no images found" 1
+[ -s "$datafile" ] || sh_info "no images found" 1
############################
## downloading thumbnails ##
@@ -130,11 +130,11 @@ done | curl -Z -K -
#sh_info "downloaded thumbnails..."
###########################
-## user selection (sxiv) ##
+## user selection (nsxiv) ##
###########################
# extract the id's out of the thumbnail name
-image_ids="$(sxiv $sxiv_otps "$cachedir")"
+image_ids="$(nsxiv $sxiv_otps "$cachedir")"
[ -z "$image_ids" ] && exit
#########################
@@ -155,4 +155,4 @@ do
done | curl -K -
sh_info "wallpapers downloaded in:- '$walldir/$query'"
-sxiv $(ls -c)
+nsxiv $(ls -c)