Update dunstrc and watch.sh
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
5c893b60aa
commit
a02e32523d
3 changed files with 8 additions and 5 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
# The file to watch
|
||||
FILE="${1}"
|
||||
FILENAME=$(basename "${FILE}")
|
||||
|
||||
# The rest of the arguments is the command
|
||||
shift
|
||||
|
@ -24,6 +25,6 @@ COMMAND="${@}"
|
|||
print_header "Watching ${FILE}"
|
||||
while inotifywait -qq -e close_write "${FILE}";
|
||||
do
|
||||
print_log "File has changed, executing command"
|
||||
print_log "${FILENAME} has changed" "Executing command"
|
||||
$($COMMAND)
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue