Skip to content

Instantly share code, notes, and snippets.

@brianm
Created September 10, 2020 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianm/0efcc913de9a908c29c50a39ea8500ff to your computer and use it in GitHub Desktop.
Save brianm/0efcc913de9a908c29c50a39ea8500ff to your computer and use it in GitHub Desktop.
#!/bin/zsh
# [BitBar](https://github.com/matryer/bitbar) script to display air quality
[[ -a ~/.zshrc ]] && source ~/.zshrc
# aqi can be installed via `brew install brianm/tools/aqi`
# whereami can be installed via `brew install brianm/tools/whereami`
tmp=$(mktemp)
whereami | xargs aqi -- | sort -rn > $tmp
echo "Air: $(head -1 $tmp | cut -f 2)"
echo "---"
cat $tmp
rm $tmp
@brianm
Copy link
Author

brianm commented Sep 11, 2020

BitBar, whereami (brew install brianm/tools/whereami) and aqi (brew install brianm/tools/aqi) needed. Drop this script in your BitBar plugin folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment