diff --git a/screenshot-spmenu b/screenshot-spmenu index b85ac6a..15bc987 100755 --- a/screenshot-spmenu +++ b/screenshot-spmenu @@ -52,8 +52,7 @@ send_notif() { } upload_image() { - [ "$IMAGE_HOST" = "imgbb" ] && IMAGE="$(curl -s -F source=@"$1" -F "type=file" -F "action=upload" "https://imgbb.com/json" | sed "s/\\\\//g; s/\"/\\n/g" | grep -m 1 -A 2 url | tail -n 1)" - [ "$IMAGE_HOST" = "0x0" ] && IMAGE="$(curl -s -F file=@"$1" -F secret= https://0x0.st)" + IMAGE="$(curl -s -F source=@"$1" -F "type=file" -F "action=upload" "https://imgbb.com/json" | sed "s/\\\\//g; s/\"/\\n/g" | grep -m 1 -A 2 url | tail -n 1)" printf "%s\n" "$IMAGE" && return 0 || return 1 } @@ -63,7 +62,6 @@ mkdir -p "$SCREENSHOT_CONFIG_DIR" [ -e "$SCREENSHOT_CONFIG_DIR/screenshotrc" ] && . "$SCREENSHOT_CONFIG_DIR/screenshotrc" || cat << CONFIG > "$SCREENSHOT_CONFIG_DIR/screenshotrc" # screenshot-spmenu config file RUNLAUNCHER="spmenu" # Run launcher to use -IMAGE_HOST="imgbb" # Image host (imgbb/0x0) SHOW_CURSOR="true" # Show cursor or not (true/false) DEFAULT_SCREENSHOT_DIRECTORY="$HOME/Screenshots" # Default screenshot path PREFIX="screenshot-" # Screenshot prefix