all repos — dotfiles @ c7a9e48bdfad3a636f1b166829cfea60aec08bdd

my *nix dotfiles

bin/up: NO_CP env var
Anirudh Oppiliappan x@icyphox.sh
Tue, 15 Feb 2022 10:26:04 +0530
commit

c7a9e48bdfad3a636f1b166829cfea60aec08bdd

parent

694b92e8797f094c3413e8bcc13b68fe5dc39cb2

1 files changed, 10 insertions(+), 8 deletions(-)

jump to
M bin/upbin/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" }