todo-notify (348B)
1 #!/bin/bash 2 3 TODO_FILE="$HOME/.nb/notes/todo.txt" 4 current_date="" 5 6 while IFS= read -r line || [[ -n "$line" ]]; do 7 if [[ "$line" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2} ]]; then 8 current_date="$line" 9 elif [[ "$line" =~ ^todo:\ (.*)$ ]]; then 10 todo_message="${BASH_REMATCH[1]}" 11 notify-send "$current_date" "$todo_message" 12 wait 13 fi 14 done <"$TODO_FILE"