Skip to content

Instantly share code, notes, and snippets.

@mcky
Created February 1, 2016 05:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcky/211f41011a2c1c6ecdb9 to your computer and use it in GitHub Desktop.
Save mcky/211f41011a2c1c6ecdb9 to your computer and use it in GitHub Desktop.
mondo bitbar
#!/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