Skip to content

Instantly share code, notes, and snippets.

@andreferreirav2
Last active July 5, 2016 18:14
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 andreferreirav2/8e36d05aec9a5c9c36ef96bafe3e29a5 to your computer and use it in GitHub Desktop.
Save andreferreirav2/8e36d05aec9a5c9c36ef96bafe3e29a5 to your computer and use it in GitHub Desktop.

CaixaBreak PopUp for MacOSX

Following the work in kintoandar/caixabreak by user @kintoandar, I made an Automator app for MacOSX, because I'm lazy.

Instructions

  • Follow the installation instructions of the original project.
  • Open Automator
  • Create a new Application
  • Drag a Run Shell Script to the right
  • In the text box, paste the following:
    • source ~/.zshrc; osascript -l JavaScript -e "app=Application.currentApplication(); app.includeStandardAdditions = true; app.displayNotification('$(/usr/local/bin/caixabreak -b | sed -n 2p)', {withTitle: 'CaixaBreak'})"
    • Replace ~/.zshrc with the file where you store the CGD_USER and CGD_PASS env variables
  • Save with the name you want, ex: caixa.app
  • Congratulations! You can now open Spotlight/Alfred and search for the app you just created. A nice looking popup will appear in the top right corner of your screen with your balance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment