Last active
April 13, 2022 18:21
-
-
Save deemp/cda997cec3b6f0333323b89fa8dfa520 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| TARGET=~/Downloads/Remote/ | |
| inotifywait -m -e create -e moved_to -e modify --format "%f" $TARGET \ | |
| | while read FILENAME | |
| do | |
| echo Detected $FILENAME, copying to clipboard | |
| # https://askubuntu.com/a/759660 | |
| xclip -selection clipboard -t image/png -i "${TARGET}${FILENAME}" | |
| echo Copied "${TARGET}${FILENAME}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment