Add better notes integration

This commit is contained in:
Daniel Flanagan 2018-11-03 14:06:15 -05:00
parent c41ccca3b8
commit 6035b6b697
4 changed files with 18 additions and 2 deletions

View file

@ -26,6 +26,8 @@ pulseaudio --start &
xset s off -dpms & xset s off -dpms &
redshift &
urxvtd & urxvtd &
autocutsel -fork & autocutsel -fork &

View file

@ -77,6 +77,8 @@ if [ "$PWD" = "$HOME" ]; then
cd "$NICE_HOME" cd "$NICE_HOME"
fi fi
_make_paths
LS_COLORS='ow=01;36;40' LS_COLORS='ow=01;36;40'
export LS_COLORS export LS_COLORS

View file

@ -46,11 +46,16 @@ editscrot() {
n() { n() {
SUBDIR="${2:-}" SUBDIR="${2:-}"
mkdir -p "$NICE_HOME/doc/notes/$SUBDIR" mkdir -p "$NOTES_PATH/$SUBDIR"
"$EDITOR" "$NICE_HOME/doc/notes/$SUBDIR/$(date +%Y-%m-%d)_$1.md" "$EDITOR" "$NOTES_PATH/$SUBDIR/$(date +%Y-%m-%d)_$1.md"
} }
export -f n export -f n
s() {
"$EDITOR" "$NOTES_PATH/_scratch.md"
}
export -f s
# save the current directory for later retrieval # save the current directory for later retrieval
scwd() { scwd() {
addon="" addon=""

View file

@ -18,3 +18,10 @@ fi
if command -v ruby >/dev/null 2>&1; then if command -v ruby >/dev/null 2>&1; then
export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
fi fi
export NOTES_PATH="$NICE_HOME/doc/notes"
_make_paths() {
mkdir -p "${NOTES_PATH}"
}
export -f _make_paths