Skip to content

Instantly share code, notes, and snippets.

@horaciod
Last active May 11, 2022 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save horaciod/bc89543efe04615c8cda80ed9c18cb07 to your computer and use it in GitHub Desktop.
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.
#!/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