For a fast overview of your XMR and P2pool stats, without having to open the wallet and wait for it to sync.
It also can get your xmrvsbeast stats.
- You'll need some kind of crypto font (e.g. cryptocoins, wp-cryptofonts, crypto-icons...)
- Rates, to convert to your favourite fiat currency
- Waybar (haven't tested with others like polybar, but it should be easy enough to modify it for it)
The rest is done using P2pool's observer API and some minimal, direct scraping of the website;
and Localmonero's API (can be USD, GBP, EUR or HKD).
- Download or clone this repo and put waybar-monero.sh in
~/.config/waybar/scripts/
for example
Expand
- With curl
# Make directory if needed
mkdir ~/.config/waybar/scripts
# Download the script
curl -LJO 'https://github.com/muvment/waybar-monero/raw/main/waybar-monero.sh'
# Copy the script into your scripts folder
mv waybar-monero.sh ~/.config/waybar/scripts
# Make it executable
chmod +x ~/.config/waybar/scripts/waybar-monero.sh
- With git
# Make directory if needed
mkdir ~/.config/waybar/scripts
# Clone the repo
git clone https://github.com/muvment/waybar-monero
# cd into the cloned folder
cd waybar-monero
# Copy the script into your scripts folder
cp waybar-monero.sh ~/.config/waybar/scripts
# Make it executable
chmod +x ~/.config/waybar/scripts/waybar-monero.sh
cd
- Open
~/.config/waybar/scripts/waybar-monero.sh
in your editor and modify the following
Expand
# Your wallet address
address=""
# Main account balance (put your personal/primary account balance in XMR here)
main=""
# Currency to be used with localmonero query (can be USD, EUR, GBP or HKD)
currency=""
# Currency symbol to use in display ($, £, €, etc...)
symbol=""
# Crypto symbols
## Monero
m=""
## Other cryptos to show (choose the ones you want)
s1=""
s2=""
## Fetch p2pool balance, unquote the correct one (first is main, second is mini)
#p2pool=$(curl -sS "https://p2pool.observer/payouts/$address" | grep -Po '(?<=<p><strong>Estimated total:</strong>).*?(?<=XMR</p>)' | awk '{print $1}')
#p2pool=$(curl -sS "https://mini.p2pool.observer/payouts/$address" | grep -Po '(?<=<p><strong>Estimated total:</strong>).*?(?<=XMR</p>)' | awk '{print $1}')
- In your
~/.config/waybar/config
(you can change the interval to whatever you want, but remember you're using public APIs so don't abuse them)
Expand
"custom/crypto": {
"format": "",
"return-type": "json",
"format-alt": "{}",
"interval": 3600,
"exec": "$HOME/.config/waybar/scripts/waybar-monero.sh w",
"tooltip":true
},
- Download/clone needed fonts (I'm using cryptocoins).
Personally I put them in~/.local/share/fonts
Expand
# Download the fonts
curl -LJO 'https://github.com/AllienWorks/cryptocoins/blob/master/webfont/cryptocoins.ttf?raw=true'
# Copy them to your fonts folder
cp cryptofont.ttf ~/.local/share/fonts
# Reload font cache
fc-cache -f -v
- Reload your waybar config
Expand
# Waybar output
./waybar-monero.sh w
# Terminal output (if you want to use it in your terminal)
./waybar-monero.sh t
BTC: bc1qn8z2jcm0nxgwsssr5leu7gs9hrltuxt94xsmj5
LTC: ltc1qghje97y75lr3wqc5u3qc80ag9sg04sy9453d62
XMR: 83DP8YWimcZBsGkgdegsvRdARa94LoYXeeBjFbbdrQNzMcBw9N7kpyZbydL9iGA9Sc8G1dx42A1bHPvQsmTo5UVj7buwVEm