diff options
Diffstat (limited to '.local/bin/notes')
| -rwxr-xr-x | .local/bin/notes | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/.local/bin/notes b/.local/bin/notes index 05ca7c2..cdafd6b 100755 --- a/.local/bin/notes +++ b/.local/bin/notes @@ -1,9 +1,15 @@ #!/usr/bin/bash set -euo pipefail +app_name=notes +if ! [[ -d $NOTES_DIR ]]; then + notify-send --app-name="$app_name" --icon="accessories-text-editor" \ + "Notes" "Could not open NOTES_DIR ($NOTES_DIR)" + exit 1 +fi +cd "$NOTES_DIR" # Open the notes directory in foot, inside a persistent tmux session named # "notes" (stolen if it already exists), landing straight into an fzf picker -cd "$NOTES_DIR" -exec foot --app-id=notes -- \ - tmux new-session -A -D -s notes -- \ +exec foot --app-id="$app_name" -- \ + tmux new-session -A -D -s "$app_name" -- \ nvim -c "NotesFindTags" |
