dotfiles/scripts/flameshot_upload_latest.sh

21 lines
415 B
Bash
Raw Normal View History

2019-04-22 20:30:22 +02:00
#!/bin/sh
latest_screenshot=$(ls -t ~/Pictures/Screenshots/ | head -1)
file_name=$(echo ~/Pictures/Screenshots/)
base_name=$latest_screenshot
file_name+=$base_name
sftp -oPort=4242 gaudonpr@ftp.gaudon.pro << EOT
cd public_html/push.arisu.fr/
put $file_name
EOT
url="https://push.arisu.fr/"
url+=$base_name
echo $url | xclip -selection clipboard
notify-send "File upload complete" "$url" --icon=flameshot.svg