2020-04-09 04:18:20 +00:00
|
|
|
#!/bin/bash
|
2020-07-13 09:56:26 +00:00
|
|
|
set -e
|
|
|
|
|
2021-08-15 04:06:07 +00:00
|
|
|
SCREENSHOT=leanshot
|
2020-04-09 04:18:20 +00:00
|
|
|
# choose some file to save it to
|
2020-07-13 09:56:26 +00:00
|
|
|
FILENAME="$(date +%Y-%m-%d-%H:%M:%S).png"
|
|
|
|
FILE="$HOME/Screenshots/$FILENAME"
|
2020-04-09 04:18:20 +00:00
|
|
|
$SCREENSHOT $1 -o $FILE
|
2020-07-13 09:56:26 +00:00
|
|
|
|
|
|
|
# copy to clipboard
|
2020-04-09 04:18:20 +00:00
|
|
|
XCLIP=/usr/bin/xclip
|
|
|
|
$XCLIP -selection clipboard -t image/png -i $FILE
|
2020-07-13 09:56:26 +00:00
|
|
|
notify-send "captured $FILENAME"
|
|
|
|
|
|
|
|
# upload it
|
2020-11-14 01:34:09 +00:00
|
|
|
# url=$(ssh -vv -i $HOME/.ssh/id_rsa homelab $HOME/.local/bin/file-upload $FILENAME < $FILE 2> log)
|
|
|
|
# url=${url%$'\n'}
|
|
|
|
# $XCLIP -selection clipboard <<< "$url"
|
|
|
|
# notify-send "uploaded $FILENAME"
|
2020-07-13 09:56:26 +00:00
|
|
|
|