#!/bin/sh # Original repository # https://git.lapacz-kornel.dev/dotfiles filename=$1 if [ -z "$filename" ]; then echo "usage: 0x0 filename" exit 1 fi if [ ! -f "$filename" ]; then echo "file $filename doesn't exist" exit 1 fi url=$(curl -F"file=@$filename" https://0x0.st) [ -z "$url" ] && exit 1 echo "$url" echo "$url" | xclip -selection clipboard