From 83dcdb42f4809f2d877c2f839af9653e2b71697e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 2 Oct 2016 22:49:30 +1100 Subject: [PATCH] Add args to --upload and --su --- config/config | 2 +- neofetch | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/config b/config/config index 5f37472d..6d52a5e3 100644 --- a/config/config +++ b/config/config @@ -406,7 +406,7 @@ scrot_name="neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png" # Image upload host # Where to upload the image. -# Possible values: teknik, +# Possible values: imgur, teknik image_host="imgur" # Imgur api key diff --git a/neofetch b/neofetch index 205caeaa..2bd4931d 100755 --- a/neofetch +++ b/neofetch @@ -2961,7 +2961,7 @@ usage() { cat << EOF --scrot | -s /path/to/img Take a screenshot, if path is left empty the screen- shot function will use \$scrot_dir and \$scrot_name. --upload | -su Same as --scrot but uploads the scrot to a website. - --image_host Website to upload scrots to. Takes: teknik, + --image_host Website to upload scrots to. Takes: imgur, teknik --scrot_cmd cmd Screenshot program to launch Other: @@ -3127,6 +3127,11 @@ getargs() { --upload | -su) scrot="on" scrot_upload="on" + + if [ "$2" ]; then + scrot_name="${2##*/}" + scrot_dir="${2/$scrot_name}" + fi ;; --image_host) image_host="$2" ;; --scrot_cmd) scrot_cmd="$2" ;;