Created
February 1, 2016 05:55
-
-
Save mcky/211f41011a2c1c6ecdb9 to your computer and use it in GitHub Desktop.
mondo bitbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires: | |
# - mondo-bank (`npm install mondo-bank -g`) | |
# - jq (`brew install jq`) | |
export PATH="/usr/local/bin:/usr/bin/:$PATH"; | |
JSON=$(mondo balance --account_id=YOURID) | |
BALANCE=$(echo $JSON | jq '.balance' | awk '{print "£"$1/100}') | |
SPENT=$(echo $JSON | jq '.spend_today' | awk '{print "£"$1/100}') | |
echo $BALANCE | |
echo '---' | |
echo "Balance: $BALANCE" | |
echo "Spent today: $SPENT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment