Skip to content

Instantly share code, notes, and snippets.

@brianm
Created September 10, 2020 19:40
Embed
What would you like to do?
#!/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