BitBar lets you put the output from any script/program in your Mac OS X Menu Bar.
Example showing the latest Buy and Sell figures for BitCoins:
Click to see the full output, and more options:
Example showing your internal and external IP addresses:
- Get the latest version of BitBar for FREE, or pick a different release
- Copy it to your Applications folder and run it - it will ask you to (create and) elect a plugins folder, do so
- Help yourself by Browsing our plugins to find useful scripts, or write your own
- Ensure they can be executed
- Enjoy
If you use this, please donate BitCoin to 1DGoNEYAnjE5DqK7y5zMPR4PLU5HLKpLNR
.
Just download the plugin of your choice into your BitBar plugins directory and choose 'Reset' from one of the BitBar menus.
The refresh time is in the filename of the plugin, following this format:
{name}.{time}.{ext}
name
- The name of the filetime
- The refresh rate (see below)ext
- The file extension
For example:
date.1m.sh
would refresh every minute.
Most plugins will come with a default, but you can change it to anything you like:
- 10s - ten seconds
- 1m - one minute
- 2h - two hours
- 1d - a day
Ensure the plugin is executable by running chmod +x plugin.sh
.
- To write a plugin, just write some form of executable script that outputs to the standard output.
- Multiple lines will be cycled through over and over.
- If your output contians a line consisting only of
---
, the lines below it will appear in the dropdown for that plugin, but won't appear in the menu bar itself. - Your lines might contain
|
to separate the title from other parameters, such as...href=..
to make the dropdown items clickablecolor=..
to change their text color. eg.color=red
orcolor=#ff0000
bash=..
to make the dropdown items open terminal with your script e.g.bash=/Users/user/BitBar_Plugins/scripts/nginx.restart.sh
param1=..
if sh script need paramsparam2=..
if sh script need paramsparam3=..
if sh script need paramsterminal=..
if need to start bash script without open Terminal may be true or false
- If you're writing scripts, ensure it has a shebang at the top.
#!/bin/bash
date
#!/bin/bash
# the current date and time
date
# the current username
echo $USER
# the current user id
id -u
#!/bin/bash
echo "One"
echo "Two"
echo "Three"
echo "---"
echo "Four"
echo "Five"
echo "Six"
- Only One, Two and Three will appear in the top bar
- Clicking the plugin menu item will show all lines
#!/bin/bash
curl -m 1 http://example.com -I >/dev/null 2>&1
[ $? -gt 0 ] && echo "FAIL | color=red" || echo "OK | color=green"
echo "---"
echo "Show Graphs | color=#123def href=http://example.com/graph?foo=bar"
echo "Show KPI Report | color=purple href=http://example.com/report"
Please send us a pull request and we'll add it to our repos.