Add new script, move blog to better path.
This commit is contained in:
parent
7ce24d937c
commit
22a1922ce9
44
home-manager/modules/scripts/day
Executable file
44
home-manager/modules/scripts/day
Executable file
@ -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 <<EOF >"$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"
|
Loading…
Reference in New Issue
Block a user