bin/up: NO_CP env var
Anirudh Oppiliappan x@icyphox.sh
Tue, 15 Feb 2022 10:26:04 +0530
1 files changed,
10 insertions(+),
8 deletions(-)
jump to
M
bin/up
→
bin/up
@@ -4,14 +4,16 @@ LATEST_SCROT="$HOME/pics/scrots/latest.png"
upload() { out="$(curl -s -F "file=@$1" -F "key=$(pw -s fsrv)" https://x.icyphox.sh)" - case "$OSTYPE" in - darwin*) - printf "$out" | pbcopy - ;; - *) - printf "$out" | xclip -sel c - ;; - esac + [[ ! "$NO_CP" -eq 1 ]] && { + case "$OSTYPE" in + darwin*) + printf "$out" | pbcopy + ;; + *) + printf "$out" | xclip -sel c + ;; + esac + } printf "$out\n" }