move j to subdir based on month
This commit is contained in:
parent
5717a8e24b
commit
c0f4edd4bd
1 changed files with 5 additions and 1 deletions
6
.bashrc
6
.bashrc
|
@ -52,5 +52,9 @@ bash ~/.motd
|
||||||
# quick writing funcs
|
# quick writing funcs
|
||||||
function unlock() { export SOPS_AGE_KEY=$(age -d ${HOME}/.age/privkey.age); }
|
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 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; }
|
function lock() { unset SOPS_AGE_KEY; }
|
||||||
|
|
Loading…
Reference in a new issue