Created
August 28, 2015 18:33
-
-
Save lattera/e20f2e2e991df3594f02 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
#!/usr/local/bin/zsh | |
echo '{ "version": 1 }' | |
echo '[' | |
echo '[]' | |
while true; do | |
cat <<EOF | |
,[ | |
{ | |
"name": "battery", | |
"full_text": "Battery: $(sysctl -n hw.acpi.battery.life)" | |
}, | |
{ | |
"name": "volume", | |
"full_text": "Volume: $(mixer -s vol | awk '{print $2;}')" | |
}, | |
{ | |
"name": "date", | |
"full_text": "$(date '+%A, %d %b %Y')" | |
}, | |
{ | |
"name": "time", | |
"full_text": "$(date '+%T')" | |
} | |
] | |
EOF | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment