Last active
May 11, 2022 03:05
-
-
Save horaciod/bc89543efe04615c8cda80ed9c18cb07 to your computer and use it in GitHub Desktop.
Toma un screenshot en linux y lo envía con el script telegram-notify.sh a un bot en telegram.
This file contains 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/bash | |
### llamar con la cantidad de segundos de espera entre captura y captura | |
sleep 3 | |
while true | |
do | |
gnome-screenshot -f /tmp/screen.png | |
fecha=`date +%Y-%m-%d\ %H:%M` | |
echo $fecha | |
./telegram-notify.sh --html --success --text "captura del $fecha" --photo /tmp/screen.png | |
ls -lb /tmp/screen.png | |
rm /tmp/screen.png | |
sleep $1 | |
echo "Enviado cada $1 segundos" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment