GNU/Linux screen-256color zsh 623 views

write-do:

#!/bin/zsh

files="$(cat)"
while true; do;
    xargs inotifywait -e close_write <<< "$files";
    eval $WRITE_DO_BEFORE;
    sleep 0.5; "$@";
    eval $WRITE_DO_AFTER;
done

write-do-notify:

write-do-notify () {
        export WRITE_DO_BEFORE='echo -n "$(tput bold)==> $(tput sgr0)";'
        export WRITE_DO_AFTER='echo "$(tput bold)<== $(tput sgr0)";'
}

More recordings by ij

Browse all