diff options
author | ダカマ <dakama@kakeranoumi.xyz> | 2025-06-02 13:08:46 +0200 |
---|---|---|
committer | ダカマ <dakama@kakeranoumi.xyz> | 2025-06-02 13:08:46 +0200 |
commit | 14a892e627a375334a02381351f139d94ad7ecf3 (patch) | |
tree | e7c1ee5040f3076f57401b3b9e9eb567e2ecfb1a /miscripts/inotifytest.sh |
Diffstat (limited to 'miscripts/inotifytest.sh')
-rw-r--r-- | miscripts/inotifytest.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/miscripts/inotifytest.sh b/miscripts/inotifytest.sh new file mode 100644 index 0000000..860c7ad --- /dev/null +++ b/miscripts/inotifytest.sh @@ -0,0 +1,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 |