Skip to content

Instantly share code, notes, and snippets.

@pascalpoitras
Last active November 18, 2025 19:13
Show Gist options
  • Select an option

  • Save pascalpoitras/914a40cf12b8877516d67afd307c8c2e to your computer and use it in GitHub Desktop.

Select an option

Save pascalpoitras/914a40cf12b8877516d67afd307c8c2e to your computer and use it in GitHub Desktop.
For someone on IRC

WeeChat Screenshot

I could have pipe the output to jq but I always prefer to avoid using /exec -sh whenever possible

/alias add price_get /exec -hsignal price_value url:https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,livepeer,arbitrum,celestia&vs_currencies=usd&precision=2
/price_get
/item addreplace price "" "${plugins.var.price}"
/trigger addreplace item_price_content hsignal price_value
/trigger set item_price_content regex "/usd/ /out /,/ /out /[^[:alnum:]. ]//out /arbitrum/ARB/out /celestia/TIA/out /livepeer/LPT/out /ethereum/⟠/out /bitcoin/₿/out /([^ ]+ [^ ]+) ([^ ]+ [^ ]+) ([^ ]+ [^ ]+) ([^ ]+ [^ ]+) ([^ ]+ [^ ]+)/${re:2} ${re:4} ${re:5} ${re:1} ${re:3}/out"
/trigger set item_price_content command "/mute -core /set plugins.var.price ${out};/item refresh price"
/trigger addreplace item_price_refresh timer "50000" "" "" "/price_get"

Then add the price item to a bar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment