From 6035b6b69775a9a5161b94deea0a66d725fcef59 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 3 Nov 2018 14:06:15 -0500 Subject: [PATCH] Add better notes integration --- de/xinitrc | 2 ++ shell/bashrc | 2 ++ shell/funcs | 9 +++++++-- shell/paths | 7 +++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/de/xinitrc b/de/xinitrc index 5fcfe53..b59063e 100644 --- a/de/xinitrc +++ b/de/xinitrc @@ -26,6 +26,8 @@ pulseaudio --start & xset s off -dpms & +redshift & + urxvtd & autocutsel -fork & diff --git a/shell/bashrc b/shell/bashrc index 174c15f..ff5dad9 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -77,6 +77,8 @@ if [ "$PWD" = "$HOME" ]; then cd "$NICE_HOME" fi +_make_paths + LS_COLORS='ow=01;36;40' export LS_COLORS diff --git a/shell/funcs b/shell/funcs index eccd54e..1806acf 100644 --- a/shell/funcs +++ b/shell/funcs @@ -46,11 +46,16 @@ editscrot() { n() { SUBDIR="${2:-}" - mkdir -p "$NICE_HOME/doc/notes/$SUBDIR" - "$EDITOR" "$NICE_HOME/doc/notes/$SUBDIR/$(date +%Y-%m-%d)_$1.md" + mkdir -p "$NOTES_PATH/$SUBDIR" + "$EDITOR" "$NOTES_PATH/$SUBDIR/$(date +%Y-%m-%d)_$1.md" } export -f n +s() { + "$EDITOR" "$NOTES_PATH/_scratch.md" +} +export -f s + # save the current directory for later retrieval scwd() { addon="" diff --git a/shell/paths b/shell/paths index ac26010..6af0847 100644 --- a/shell/paths +++ b/shell/paths @@ -18,3 +18,10 @@ fi if command -v ruby >/dev/null 2>&1; then export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" fi + +export NOTES_PATH="$NICE_HOME/doc/notes" + +_make_paths() { + mkdir -p "${NOTES_PATH}" +} +export -f _make_paths