mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
agenda: Exit if any of the .org files do not exist
This commit is contained in:
parent
4e73935c18
commit
e720d3ec01
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
org_files=("$HOME/notes/todo.org" "$HOME/notes/birthdays.org" "$HOME/notes/finance.org" "$HOME/notes/health.org" "$HOME/notes/home.org")
|
||||
|
||||
for file in "${org_files[@]}"; do
|
||||
if [ ! -f "$file" ]; then
|
||||
echo File "$file" does not exist
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
update() {
|
||||
~/.config/eww/scripts/agenda.py "${org_files[@]}"
|
||||
~/.config/eww/scripts/cal.py
|
||||
|
|
@ -19,5 +26,6 @@ done)&
|
|||
|
||||
while true; do
|
||||
inotifywait -qq -e modify "${org_files[@]}"
|
||||
echo update
|
||||
update;
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue