Last active
May 17, 2023 17:40
-
-
Save MatthieuLeboeuf/dc058da19785b951e4df327decda3318 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
UUID=$(cat /proc/sys/kernel/random/uuid) | |
touch /tmp/$UUID | |
tmp="/tmp/$UUID" | |
#gnome-screenshot -a -f $tmp | |
spectacle -rbn -o $tmp | |
size=$(wc -c < "$tmp") | |
if [ $size != 0 ]; then | |
rclone copy --header-upload "Content-Type: image/png" $tmp sharex:sharex | |
echo "https://s.matthieul.dev/$UUID" | xclip -sel c | |
notify-send "screenshot sent" -t 2000 | |
exit 0 | |
fi | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment