]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/tools/files/monitor_home.service
Monitor home for new files
[perso/Immae/Config/Ansible.git] / roles / tools / files / monitor_home.service
diff --git a/roles/tools/files/monitor_home.service b/roles/tools/files/monitor_home.service
new file mode 100644 (file)
index 0000000..6bb0471
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Monitor home
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/sh -c '/usr/bin/inotifywait -m $HOME $XDG_DATA_HOME $XDG_CONFIG_HOME -e create -e moved_to | while read i j k; do /usr/bin/dunstify -u CRITICAL -t 0 -a "File created in home" "$i$k"; done'
+
+[Install]
+WantedBy=default.target