dotfiles: leviathan: arch-openbox-20231010
This commit is contained in:
15
.local/bin/pst
Executable file
15
.local/bin/pst
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
url="https://bin.xstefen.dev"
|
||||
filepath="$1"
|
||||
filename=$(basename -- "$filepath")
|
||||
extension="${filename##*.}"
|
||||
|
||||
response=$(curl --data-binary @${filepath:-/dev/stdin} --url $url)
|
||||
|
||||
#echo "$url$response"".""$extension" | tee >(xclip -selection clipboard)
|
||||
|
||||
pastelink="$url$response"
|
||||
[ -z "$extension" ] && \
|
||||
echo "$pastelink" || \
|
||||
echo "$pastelink.$extension"
|
Reference in New Issue
Block a user