summaryrefslogtreecommitdiffstats
path: root/.local/bin/notes
blob: aa349600304ab27bfbba430ba531bcdcf9e78e76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/bash
set -euo pipefail

APP_NAME=notes

# Log with notify-send and exit 1
err() {
	notify-send --app-name="$APP_NAME" --icon="accessories-text-editor" \
		"Neovim notes plugin" "$NOTES_DIR does not exist or is not a directory"
	exit 1
}

[[ -d $NOTES_DIR ]] || err
cd "$NOTES_DIR"
exec foot -- \
	tmux new-session -A -D -s "$APP_NAME" -- \
	nvim -c "NotesFindTags"