Last active
December 15, 2015 15:48
-
-
Save fijidah/0da306dee30bdc9671a3 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/bash | |
# Watoson plug-in for BitBar | |
# Watson: https://github.com/TailorDev/Watson | |
# BitBar: https://github.com/matryer/bitbar | |
# Save file as watson.5m.sh in plug-ins directory of BitBar and make it executable | |
source ~/.virtualenv/misc/bin/activate | |
WATSON_STATUS=`watson status` | |
python -c " | |
import sys | |
import re | |
PATTERN = re.compile('Project\s+([a-zA-Z0-9_]+)( \[[a-zA-Z0-9_]+\])*\s+started.*') | |
m = PATTERN.match(sys.argv[1]) | |
if m: | |
print 'Project:', m.group(1) | |
else: | |
print 'NO PROJECT' | |
" "$WATSON_STATUS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment