dotfiles
shell, editor, ssh.
git clone https://owenrusk.dev/dotfiles.git
commit 57b234865f38ddc7ee7b2cfbcb755f1a945d727e parent 9d822a1534b8e8a2ea2b3adf2feddfaa3fe70a45 author Owen Rusk <owen@papermothgames.com> date 2025-01-29 18:20:13 -0600
bin: note
| bin/note | +10 | -0 |
diff --git a/bin/note b/bin/note
new file mode 100755
index 0000000..d139b54
--- /dev/null
+++ b/bin/note
@@ -0,0 +1,10 @@
+#!/bin/sh
+# note some words: they go on the end of this month's file. no words: open it.
+dir=${NOTES:-$HOME/notes}
+file="$dir/$(date +%Y-%m).md"
+mkdir -p "$dir"
+
+if [ $# -eq 0 ]; then
+ exec "${EDITOR:-nvim}" "$file"
+fi
+printf -- '- %s %s\n' "$(date '+%d %H:%M')" "$*" >> "$file"