commit 406c249e9916a872de4939954d95ce7358b5e041
parent 1d7294a8e1b18c6a6c27f466c0085c0492e0e2f3
Author: clamiax <smoppy@gmail.com>
Date: Sun, 5 Jan 2014 20:39:45 +0000
Add -n flag (MAXIMGS)
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/scrapthumb b/scrapthumb
@@ -2,9 +2,6 @@
# Scrap Tumblr to get random images
# Usage: feh -dF $(./scrapthumb)
-# TODO
-# - Allow more than JPEGs
-
VIEWER=echo
MAXIMGS=5
@@ -36,6 +33,12 @@ preload() {
}
main() {
+ while getopts "n:" opt; do
+ case $opt in
+ n) MAXIMGS=$OPTARG;;
+ esac
+ done
+
preload
$VIEWER ${IMGS[*]}
}