dotfiles/scripts/shrfile

16 lines
330 B
Plaintext
Raw Normal View History

2022-03-01 14:07:01 +01:00
#!/bin/bash
if [ -z "$1" ]
then
file=$(find . -maxdepth 1 -type f | cut -c 3- | rofi -i -dmenu -p "Select file to share")
else
file=$1
fi
if [ -z "$file" ]; then
exit
fi
curl -F "file=@$file" https://0x0.st | xclip -selection c
notify-send "Link to $file is copied to clipboard!"
2022-03-17 22:38:39 +01:00
echo "$(xclip -o -sel clipboard)"