Last active
December 10, 2015 12:38
-
-
Save pielgrzym/4435022 to your computer and use it in GitHub Desktop.
Using inotifywait.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch_todo(){ | |
tput smcup | |
while : ; do | |
tput clear | |
echo -n "${bg[cyan]}[[[ TODO: ]]]$reset_color\n" | |
if [[ -n $1 ]]; then | |
todo.sh "$@" | |
else | |
todo.sh ls | |
fi | |
trap 'break' 2 | |
inotifywait -e modify $HOME/Dropbox/t/todo.txt -qq | |
done | |
tput rmcup | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment