A Waybar module for displaying cryptocurrency market information from CoinMarketCap.
MIT License
A Waybar module for displaying cryptocurrency market information, utilising the CoinMarketCap API.
python
>=3.10python-requests
yay -S waybar-crypto
Note: For the time being, the cryptofont
font still needs installing manually
cd ~/.config/waybar/modules
git clone https://github.com/chadsr/waybar-crypto.git crypto && cd crypto/
git submodule update --init --recursive --remote --progress
# Use ~/.local/share/fonts/TTF (user scope, recommended) or /usr/share/fonts/TTF (system scope)
mkdir -p ~/.local/share/fonts/TTF
ln -s ./.submodules/cryptofont/fonts/cryptofont.ttf ~/.local/share/fonts/TTF
# Rebuild font cache
fc-cache -f
Create a configuration file at $XDG_CONFIG_HOME/waybar-crypto/config.ini
(This location can be customised with the --config-path
flag). The module will not run without first creating this configuration file.
An example can be found in config.ini.example
with further options described below in the Configuration section.
Found at ~/.config/waybar/config
by default
"custom/crypto": {
"format": "{}",
"interval": 600,
"return-type": "json",
"exec": "waybar-crypto", // change this if you installed manually
"exec-if": "ping pro-api.coinmarketcap.com -c1"
}
Found at ~/.config/waybar/style.css
by default
#custom-crypto {
font-family: cryptofont;
}
currency: A valid currency code
currency_symbol: A corresponding symbol of the currency you wish to display
spacer_symbol: A string/character to use as a spacer between tickers. Comment out to disable
display: A list of metrics you wish to display for each crypto currency. No spaces. Valid options are:
api_key: CoinmarketCap API key obtained from their API Dashboard
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 config.ini
configuration file.
For each cryptocurrency you wish to display, add a section as shown in the example file, where the section name is the short cryptocurrency name as found on CoinMarketCap.
Valid options: