From 6230c189faaf68df37a3637175085e468bbd0665 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Sun, 26 Apr 2020 18:21:33 -0500 Subject: [PATCH] - Changed inotify for xkeysnail config to monitor mode --- xkeysnail-config/xkeystart.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xkeysnail-config/xkeystart.sh b/xkeysnail-config/xkeystart.sh index 7a64e39..0c25068 100755 --- a/xkeysnail-config/xkeystart.sh +++ b/xkeysnail-config/xkeystart.sh @@ -1,8 +1,9 @@ #!/bin/bash # >/dev/null 2>&1 /usr/local/bin/xkeysnail --quiet --watch "$1" & -while true - do inotifywait -e close_write,moved_to,create -q "$1" - /usr/bin/killall xkeysnail - /usr/local/bin/xkeysnail --quiet --watch "$1" & + +inotifywait -m -e close_write,moved_to,create -q "$1" | +while read -r path; do + /usr/bin/killall xkeysnail + /usr/local/bin/xkeysnail --quiet --watch "$1" & done \ No newline at end of file