Crypto coins on your Mac tool bar.
Well, yeah. But I wanted one that adapted to my workflow and I was bored. The goodies:
- Prices in USD.
- Prices in EUR.
- 24h % changes.
- Switch between different parameters every few seconds.
- Paint it red if the % change is negative.
- Lots of coins.
- Doesn't take too long to get data.
This requires BetterTouchTool to work.
Assuming you have it installed:
- Click here to download.
- Open BTT.
- Go to TouchBar.
- Manage Presets > Import.
- Choose whatever coins you want to track by selecting the files in the
widgets
directory. - Open Terminal.app and run:
mkdir ~/.cache && mv /path/to/download/cryptotool ~/.cache/cryptotool
It should now be available if you press Option + Ctrl + Shift (I just like to hide it away in a corner so it doesn't distract me at all times).
By default:
- BTC
- ETH
- LTC
- XMR
- NEO
- OMG
- XRP
- MIOTA
- EOS
But any coin can be added, by anyone! Either open an issue and I'll do it for you or add it yourself!
By default you won't get any icons. But I have included a set of icons in the img
directory just for you ❤️
To use them, open BTT, select the script and simply drag the corresponding icon into the icon area like this:
Oh good, you want more coins! Yay!
If you really feel I should add them, feel free to open an issue.
But it should be pretty easy for you to do it yourself:
- Create a new widget on BTT.
- Select "Run Apple Script and Show Return Value".
- Select an existing widget (let's say BTC) and click "Advanced Configuration".
- Copy the script on the large textbox and close the window.
- Select your newly created script.
- Click "Advanced Configuration".
- Give it a cool name.
- Paste the script into the textbox.
- Change the second line coin name from
bitcoin
to whatever it is you like (let's saydash
) - Change the "execute this script every x seconds" value to 3.
- Click save.
- Voilá! It should work.
If you want, you can copy the remaining settings from the other widgets.
The alternate color should be #F81D1D
and the regex -\d+.\d+
The coin IDs are provided by CoinMarketCap.
I didn't enjoy the idea of having it check for real time data because that's slow. So I added in a caching mechanism. By default it caches results for 10 minutes. If you would like to change this value, open the coinmarketcap
file and change the CACHE_BUST
variable to whatever it is you'd like. This value is in seconds.
Great!
First up, feel free to open an issue. If you want to do it yourself, it's easy by just changing the coinmarketcap
script.
Let's say you want the hourly change percentage instead of the daily one. Open the coinmarketcap
and change the percent_change_24h
regex to percent_change_1h
.
The coinmarketcap
script parses the JSON response from CoinMarketCap and returns relevant values separated by :
. You can just append more values by updating the parse_json
call and the corresponding widget AppleScript.