summaryrefslogtreecommitdiff
path: root/miscripts/inotifytest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'miscripts/inotifytest.sh')
-rw-r--r--miscripts/inotifytest.sh9
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