diff options
author | self <george@gabbott.dev> | 2022-09-19 17:10:07 +0100 |
---|---|---|
committer | self <george@gabbott.dev> | 2022-09-19 17:10:07 +0100 |
commit | a561c51e90bfb9b2500adb874490f195a9757549 (patch) | |
tree | af4070f5b2678e09d096d15fbfa831fa199d0d59 | |
parent | 3a2cd83df27b27f365a8974ee7818db2248f5357 (diff) |
Moved mk~ functions into separate file
-rw-r--r-- | zsh/.zshrc | 45 | ||||
-rw-r--r-- | zsh/.zshrc-mk | 45 |
2 files changed, 47 insertions, 43 deletions
@@ -189,54 +189,13 @@ abbrev-alias grr="git-rename-remotes" abbrev-alias gpr="git-print-remotes" abbrev-alias gcr="git-clone-add-remotes" +# Source .zshrc-mk, which contains mkwr, mn, lle, and other mk~ commands +source "$XDG_CONFIG_HOME/zsh/.zshrc-mk" # misc alias pkg-query="pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'" -lle() { # Life Log Entry: L~ - if [ -z $1 ] ; then DT="today" else DT="$1" fi - mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" - nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/L$(date --iso-8601 -d $DT).txt" -} - -holc () { # Holiday Entry: H~ - if [ -z $1 ] ; then DT="today" else DT="$1" fi - mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" - nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/H$(date --iso-8601 -d $DT).txt" -} - -mer() { # Month End Recap: M~ - if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi - mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" - nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/M$(date +%Y-%m -d $DT).txt" -} - -yer() { # Year End Recap: Y~ - if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi - mkdir -p "$HOME/docs/wr/lle/$(date +%Y -d $DT)-12" - nvim "$HOME/docs/wr/lle/$(date +%Y -d $DT)-12/Y$(date +%Y -d $DT).txt" -} - -mkdream() { # Dream Record: D~ - if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi - mkdir -p "$HOME/docs/wr/dream" - nvim "$HOME/docs/wr/dream/D$(date --iso-8601 -d $DT).txt" -} - -mn() { # make note - mkwr "mn/$1" -} - -mkkic() { # make keep-in-case: for various largely useless notes kept "just in case" - mkwr "kic/$1" -} - -mkwr() { # make written - nvim "$HOME/docs/wr/$1" -} - - autoload -Uz compinit compinit # End of lines added by compinstall diff --git a/zsh/.zshrc-mk b/zsh/.zshrc-mk new file mode 100644 index 0000000..a93d7a0 --- /dev/null +++ b/zsh/.zshrc-mk @@ -0,0 +1,45 @@ +mkwr() { + nvim "$HOME/docs/wr/$1" +} + +mkrec() { + mkwr "rec/$1" +} + +mkkic() { + mkwr "kic/$1" +} + +mkdream() { # Dream Record: D~ + if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi + mkdir -p "$HOME/docs/wr/dream" + nvim "$HOME/docs/wr/dream/D$(date --iso-8601 -d $DT).txt" +} + +mn() { # Make note + mkwr "mn/$1" +} + +lle() { # Life Log Entry: L~ + if [ -z $1 ] ; then DT="today" else DT="$1" fi + mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" + nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/L$(date --iso-8601 -d $DT).txt" +} + +holc () { # Holiday Entry: H~ + if [ -z $1 ] ; then DT="today" else DT="$1" fi + mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" + nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/H$(date --iso-8601 -d $DT).txt" +} + +mer() { # Month End Recap: M~ + if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi + mkdir -p "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)" + nvim "$HOME/docs/wr/lle/$(date +%Y-%m -d $DT)/M$(date +%Y-%m -d $DT).txt" +} + +yer() { # Year End Recap: Y~ + if [ -z $1 ] ; then DT="yesterday" else DT="$1" fi + mkdir -p "$HOME/docs/wr/lle/$(date +%Y -d $DT)-12" + nvim "$HOME/docs/wr/lle/$(date +%Y -d $DT)-12/Y$(date +%Y -d $DT).txt" +} |