From 86a3ca82c74c9109594b4d7c4a61f2d804b8ccc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 13 Nov 2018 01:51:03 +0100 Subject: Monitor home for new files --- roles/tools/files/monitor_home.service | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 roles/tools/files/monitor_home.service (limited to '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 index 0000000..6bb0471 --- /dev/null +++ b/roles/tools/files/monitor_home.service @@ -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 -- cgit v1.2.3