summaryrefslogtreecommitdiff
path: root/miscripts/inotifytest.sh
blob: 860c7add7214d160c8c18305ac8d837531ed0ee8 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash

# requires notify-tools

inotifywait -m ~/Tempsktop -e create -e moved_to |
    while read dir action file; do
        echo "The file '$file' appeared in directory '$dir' via '$action'"
        [[ -n $(echo "$file" | grep "png") ]] && feh "${dir}${file}"
    done