feat: now open just neovim if no note is selected

This commit is contained in:
Ahwx 2024-10-14 10:12:33 +02:00
parent e2e0bfa3b7
commit 9a74ba2ed4

View file

@ -13,6 +13,12 @@ cd "$NOTEDIR" || mkdir -p "$NOTEDIR" && cd "$NOTEDIR" || echo 'Error with moving
echo "Check if connected to internet and pull changes from Git"
ping -c1 github.com >/dev/null && notify-send "$(git pull)" # Pull most recent changes, be sure to not create conficts...
if [ "$CHOSEN" ]; then
kitty -e nvim "$CHOSEN" # Finally open chosen note
git add "$CHOSEN" && git commit -m "chore: updates (auto)" && git push && notify-send "Changes pushed"
else
cd "$NOTEDIR" || exit 1
kitty -e nvim
fi