2019-03-05 09:23:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-03-05 09:36:04 +00:00
|
|
|
# Simple screenshot uploader
|
|
|
|
# The web server is nginx and configured with h5ai to be a file manager
|
|
|
|
# Copyright (c) 2019 David Todd (c0de) c0de@c0defox.es
|
|
|
|
|
2019-03-05 09:23:38 +00:00
|
|
|
DATE=$(date +%Y-%m-%d-%s).png
|
|
|
|
FILENAME=~/Pictures/$DATE
|
|
|
|
|
|
|
|
maim -s $FILENAME&
|
|
|
|
wait $!
|
|
|
|
|
|
|
|
notify-send "Uploading Screenshot"
|
|
|
|
scp $FILENAME web.foxnet.space:/var/www/c0de.link/pics&
|
|
|
|
wait $!
|
|
|
|
|
|
|
|
echo https://i.c0de.link/$DATE | xclip -selection clipboard
|
|
|
|
notify-send "Link copied to Clipboard"
|