summaryrefslogtreecommitdiff
path: root/dotfiles/bashrc.sync
diff options
context:
space:
mode:
authorBlaise Thompson <blaise@untzag.com>2018-06-21 22:53:16 -0500
committerBlaise Thompson <blaise@untzag.com>2018-06-21 22:53:16 -0500
commita1a66b69b1679c876c894f4c55727b06694e7a87 (patch)
tree9c88067b5a13eaf06a0cc358c21799686ad42b30 /dotfiles/bashrc.sync
parentf2255adf794edf04d3cd6719f33b5e9d40e3d04b (diff)
2018-06-21 22:53
Diffstat (limited to 'dotfiles/bashrc.sync')
-rw-r--r--dotfiles/bashrc.sync17
1 files changed, 14 insertions, 3 deletions
diff --git a/dotfiles/bashrc.sync b/dotfiles/bashrc.sync
index 3cf596a..842211a 100644
--- a/dotfiles/bashrc.sync
+++ b/dotfiles/bashrc.sync
@@ -2,13 +2,24 @@ export PS1="\[\033[01;32m\]\u@\h \W \\$ \[$(tput sgr0)\]\[\033[0m\]"
export VISUAL=vim
export EDITOR="$VISUAL"
+export LEDGER_FILE="~/ledger/main.ledger"
+
+# --- aliases -------------------------------------------------------------------------------------
+
+alias ledger='ledger --date-format "%Y-%m-%d"'
+
+alias ledger-cash='ledger register cash --tail 15'
+
+alias ledger-checking='ledger register checking --tail 15'
+
+alias ledger-worth='ledger bal ^assets ^liabilities'
# --- functions -----------------------------------------------------------------------------------
function countdown(){
secs=$(($1 * 60));
- date1=$((`date +%s` + "$secs"));
- while [ "$date1" -ge `date +%s` ]; do
+ date1=$((`date +%s` + "$secs"));
+ while [ "$date1" -ge `date +%s` ]; do
echo -ne "$(date -u --date @$(($date1 - `date +%s`)) +%H:%M:%S)\r";
sleep 0.1
done
@@ -19,7 +30,7 @@ function git-commit-with-timestamp(){
git remote update
git pull
if ! git diff --quiet
- then
+ then
echo "COMMITING"
git add --all
git commit -m "$(date +"%Y-%m-%d %H:%M")"