From 22a1922ce9dbc052b2e17b2a4a02e844cde11f70 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 23 Mar 2024 21:33:00 +0100 Subject: [PATCH] Add new script, move blog to better path. --- home-manager/modules/scripts/{blog => }/blog | 0 home-manager/modules/scripts/day | 44 ++++++++++++++++++++ 2 files changed, 44 insertions(+) rename home-manager/modules/scripts/{blog => }/blog (100%) create mode 100755 home-manager/modules/scripts/day diff --git a/home-manager/modules/scripts/blog/blog b/home-manager/modules/scripts/blog similarity index 100% rename from home-manager/modules/scripts/blog/blog rename to home-manager/modules/scripts/blog diff --git a/home-manager/modules/scripts/day b/home-manager/modules/scripts/day new file mode 100755 index 0000000..ff4cff8 --- /dev/null +++ b/home-manager/modules/scripts/day @@ -0,0 +1,44 @@ +#!/usr/bin/env sh + +# Based on day script from mischavandenburg +# url: https://github.com/mischavandenburg/dotfiles/blob/main/scripts/day + +today=$(date +"%Y-%m-%d") +tomorrow=$(date -d "tomorrow" '+%Y-%m-%d') +yesterday=$(date -d "yesterday" '+%Y-%m-%d') +file="$SECOND_BRAIN"'/periodic/daily/'"$today.md" + +cd "$SECOND_BRAIN" || exit 1 + +new_note() { + touch "$file" + + # Give me a nice format + cat <"$file" +# $today + +[[$yesterday]] - [[$tomorrow]] + +## Intention + +What do I want to achieve today and tomorrow? + +## Tracking + +- [ ] Cycle +- [ ] Strength training +- [ ] Watch a movie or tv show episode +- [ ] Play/finish a game +- [ ] Post a blog post +- [ ] Check servers +- [ ] Check backups + +## Log +EOF +} + +if [ ! -f "$file" ]; then + new_note +fi + +nvim '+ normal Gzzo' "$file"