A collection of useful scripts that I use on my desktop machines.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
515 B

1 year ago
1 year ago
  1. #!/bin/sh
  2. latest_screenshot=$(ls -t ~/Pictures/Screenshots/ | head -1)
  3. file_name=$(echo ~/Pictures/Screenshots/)
  4. base_name=$latest_screenshot
  5. file_name+=$base_name
  6. sum1=$(cat $file_name | md5sum)
  7. sum2=$(echo -e "screenshot aborted" | md5sum)
  8. if test "$sum1" = "$sum2"; then
  9. notify-send "Last screenshot was aborted" "$url" --icon=flameshot.svg
  10. exit
  11. fi
  12. url=$(sh $(dirname $0)/upload_file.sh $file_name)
  13. echo $url | xclip -selection clipboard
  14. notify-send "File upload complete" "$url" --icon=flameshot.svg