dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit 3d9ed0266f57648ee8301b7e8a374102f23fb6b4
parent 41cf91ae9e87eb6e983571f211624ba5a17cc909
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date:   Thu,  5 Aug 2021 05:05:52 +0530

Basic implmentation of jrnl

Diffstat:
M.config/bash/aliases | 3---
M.gitignore | 3+++
A.local/bin/jrnl | 7+++++++
A.local/bin/jrnl_sync | 5+++++
M.profile | 1+
5 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/.config/bash/aliases b/.config/bash/aliases @@ -2,6 +2,3 @@ which startx >&/dev/null && alias startx="startx \"$XDG_CONFIG_HOME/X11/xinitrc\ which wget >&/dev/null && alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\"" which nvim >&/dev/null && alias vim="nvim" && alias vi="nvim" -# jrnl -[ -d "${XDG_DATA_HOME}/notes/content" ] && alias jrnl="ranger \"${XDG_DATA_HOME}/notes/content\"" - diff --git a/.gitignore b/.gitignore @@ -14,3 +14,6 @@ # Config !.config/ +# Local shell scripts +!.local/bin/ +!.local/bin/* diff --git a/.local/bin/jrnl b/.local/bin/jrnl @@ -0,0 +1,7 @@ +#!/bin/sh + + jrnl_path="${XDG_DATA_HOME}/notes/content" + +# TODO if ranger is not found, cd into that dir +[ -d "${jrnl_path}" ] && ranger "${jrnl_path}" + diff --git a/.local/bin/jrnl_sync b/.local/bin/jrnl_sync @@ -0,0 +1,5 @@ +#!/bin/sh + + jrnl_path="${XDG_DATA_HOME}/notes" + +git --git-dir="${jrnl_path}/.git" add "${jrnl_path}/contents" && git --git-dir="${jrnl_path}/.git" commit "$(date)" diff --git a/.profile b/.profile @@ -28,3 +28,4 @@ export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc export EDITOR=vim export VISUAL=vim +export PATH=${PATH}:~/.local/bin