dotfiles/.local/bin/inotify_screenshot.sh
2025-05-28 18:33:04 +02:00

13 lines
375 B
Bash
Executable File

#!/bin/bash
# Ruta del directorio a monitorear
DIRECTORIO="/home/teraflops/Imágenes/Capturas de pantalla"
# Monitorear el directorio y ejecutar el comando cuando se cree un archivo nuevo
inotifywait -m -e create --format '%f' "$DIRECTORIO" | while read NOMBRE_FICHERO
do
# Ejecutar el comando
pastebin_client.sh upload "$DIRECTORIO/$NOMBRE_FICHERO" | wl-copy -n
done