Created
September 10, 2020 19:40
-
-
Save brianm/0efcc913de9a908c29c50a39ea8500ff to your computer and use it in GitHub Desktop.
This file contains 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/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BitBar, whereami (
brew install brianm/tools/whereami
) and aqi (brew install brianm/tools/aqi
) needed. Drop this script in your BitBar plugin folder.