Skip to content

Commit

Permalink
Added note about optional API key environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
chadsr committed Oct 21, 2020
1 parent 814bf1c commit e4fae01
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@
![Example Setup](https://raw.githubusercontent.com/Chadsr/waybar-crypto/master/images/waybar_crypto.png)

### Requirements

- Python 3.6 or greater
- python-requests

### Installation

1. Clone this repo into the waybar modules directory

```
cd ~/.config/waybar/modules
git clone https://github.com/Chadsr/waybar-crypto.git crypto
pip install --user -r requirements.txt
```

2. Then in your waybar config (e.g. `~/.config/waybar/config`)

```
"custom/crypto": {
"format": "{}",
Expand All @@ -30,12 +34,14 @@ pip install --user -r requirements.txt
```

3. Install the needed fonts

```
curl -O https://github.com/AllienWorks/cryptocoins/blob/master/webfont/cryptocoins.ttf
cp cryptocoins.ttf /usr/share/fonts/TTF # Or some font path of your choice
```

### Configuration

The information displayed can be customised by editing the crypto.ini configuration file.
(e.g. `~/.config/waybar/modules/crypto/crypto.ini` if you followed the instructions above)

Expand All @@ -52,20 +58,24 @@ icon = 
[eth]
icon = 
```

- **currency:** Any valid currency code should be accepted
- **currency_symbol:** A corresponding symbol of the currency you wish to display
- **display:** A list of metrics you wish to display for each crypto currency. No spaces.

Valid options are:
- **price:** Displays the current price.
- **change1h:** Displays the price change over the past hour.
- **change24h:** Displays the price change over the past 24 hours.
- **change7d:** Displays the price change over the past week.
- **volume24h:** Displays the volume in your chosen currency, over the past 24 hours.
- **display:** A list of metrics you wish to display for each crypto currency. No spaces.
Valid options are:
- **price:** Displays the current price.
- **change1h:** Displays the price change over the past hour.
- **change24h:** Displays the price change over the past 24 hours.
- **change7d:** Displays the price change over the past week.
- **volume24h:** Displays the volume in your chosen currency, over the past 24 hours.
- **api_key:** CoinmarketCap API key obtained from their [new api](https://coinmarketcap.com/api/) (The public API is discontinuing :'()

_Alternatively, the CoinMarketCap API key can be set through the environment variable `COINMARKETCAP_API_KEY`, if you do not wish to save it to the crypto.ini file._

#### Adding cryptocurrencies:
For each cryptocurrency you wish to display, add a section as shown in the example above, where the section name is the **short** cryptocurrency name.

For each cryptocurrency you wish to display, add a section as shown in the example above, where the section name is the **short** cryptocurrency name.

Valid options:

- **icon:** A character symbol to display next to this cryptocurrency's metrics.

0 comments on commit e4fae01

Please sign in to comment.