move j to subdir based on month

This commit is contained in:
Amarpreet Minhas 2025-01-04 17:54:15 -05:00
parent 5717a8e24b
commit c0f4edd4bd

View file

@ -52,5 +52,9 @@ bash ~/.motd
# quick writing funcs
function unlock() { export SOPS_AGE_KEY=$(age -d ${HOME}/.age/privkey.age); }
function write() { SOPS_AGE_KEY=${SOPS_AGE_KEY} EDITOR='vim -c "Goyo"' sops $1; }
function j() { SOPS_AGE_KEY=${SOPS_AGE_KEY} EDITOR='vim -c "Goyo"' sops ${HOME}/journal/$(date +%Y%m%d).txt; }
function j() {
JDIR=${HOME}/journal/$(date +%Y%m)/
mkdir -p ${JDIR}
SOPS_AGE_KEY=${SOPS_AGE_KEY} EDITOR='vim -c "Goyo"' sops ${JDIR}/$(date +%d).txt
}
function lock() { unset SOPS_AGE_KEY; }