AutoYADM commit: 2025-04-23 00:45:06
This commit is contained in:
parent
bdde475e59
commit
8f98516e9b
2 changed files with 93 additions and 0 deletions
29
.config/fish/functions/2025-04-23.md
Normal file
29
.config/fish/functions/2025-04-23.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Wednesday, Apr 23, 2025
|
||||||
|
|
||||||
|
## Gratitude
|
||||||
|
|
||||||
|
I'm grateful for ...
|
||||||
|
|
||||||
|
## + Wins
|
||||||
|
|
||||||
|
- small_victories
|
||||||
|
|
||||||
|
## - Challenges
|
||||||
|
|
||||||
|
- hard_things
|
||||||
|
|
||||||
|
## Reflection
|
||||||
|
|
||||||
|
_One sentence to reflect on today:_
|
||||||
|
|
||||||
|
- reflection.
|
||||||
|
|
||||||
|
## Learned
|
||||||
|
|
||||||
|
- fact_insight_or_skill
|
||||||
|
|
||||||
|
## Tomorrow
|
||||||
|
|
||||||
|
- prep
|
||||||
|
|
||||||
|
|
64
.config/fish/functions/jrnl.fish
Normal file
64
.config/fish/functions/jrnl.fish
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
function jrnl --description 'Lightweight journaling tool'
|
||||||
|
argparse h/help d/dir=? -- $argv
|
||||||
|
set -f jdir ~/jrnl
|
||||||
|
if set -ql _flag_dir[1]
|
||||||
|
set jdir _flag_dir[1]
|
||||||
|
else if set -q jrnl_directory
|
||||||
|
set jdir $jrnl_directory
|
||||||
|
end
|
||||||
|
|
||||||
|
if not test -d $jdir
|
||||||
|
mkdir -p $jdir
|
||||||
|
end
|
||||||
|
|
||||||
|
# get the date
|
||||||
|
set today (date +'%Y-%m-%d')
|
||||||
|
set entry "$jrnl/$today.md"
|
||||||
|
# check if journal entry exists
|
||||||
|
if not test -f $entry
|
||||||
|
set -l template \
|
||||||
|
"# $(date +'%A, %b %d, %Y')
|
||||||
|
|
||||||
|
## Gratitude
|
||||||
|
|
||||||
|
I'm grateful for ...
|
||||||
|
|
||||||
|
## + Wins
|
||||||
|
|
||||||
|
- small_victories
|
||||||
|
|
||||||
|
## - Challenges
|
||||||
|
|
||||||
|
- hard_things
|
||||||
|
|
||||||
|
## Reflection
|
||||||
|
|
||||||
|
_One sentence to reflect on today:_
|
||||||
|
|
||||||
|
- reflection.
|
||||||
|
|
||||||
|
## Learned
|
||||||
|
|
||||||
|
- fact_insight_or_skill
|
||||||
|
|
||||||
|
## Tomorrow
|
||||||
|
|
||||||
|
- prep
|
||||||
|
|
||||||
|
"
|
||||||
|
echo $template >$entry
|
||||||
|
set -l prompt "Created $entry, open in $EDITOR? (y/n)"
|
||||||
|
while read --nchars 1 -l response --prompt-str="$prompt" or return 1
|
||||||
|
printf "\033[1A\033[2K"
|
||||||
|
switch $response
|
||||||
|
case y Y
|
||||||
|
eval $EDITOR $entry
|
||||||
|
break
|
||||||
|
case n N
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
eval $EDITOR $entry
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue