Cybrkyd's Git Repositories

conky-ironman - commit: e081196

commit e08119675d15aa4653f8595113a3cb11ff19927bacab23063748a961427ab38e
author Cybrkyd <git@cybrkyd.com> 2026-06-10 09:48:06 +0100
committer Cybrkyd <git@cybrkyd.com> 2026-06-10 09:48:06 +0100

Commit Message

Using awk on all prices to trim decimals

📊 Diffstat

conky/ironman 12
1 files changed, 6 insertions(+), 6 deletions(-)

Diff

diff --git a/conky/ironman b/conky/ironman
index 8db9bb1..556d25c 100644
--- a/conky/ironman
+++ b/conky/ironman
@@ -68,12 +68,12 @@ ${font Open Sans:pixelsize=12}${execi 3600 cat ~/Documents/to-do/todo.txt}${font
${voffset 4}
${offset 4}${font Open Sans:pixelsize=15}EXCHANGE (USD)${offset 8}${voffset -2}${hr}${font}
- ${font Open Sans:pixelsize=12}${color2}${offset 22}BTC : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/BTC-USD/buy | cut -d\: -f3 | cut -d\" -f2}
- ${offset 22}ETH : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/ETH-USD/buy | cut -d\: -f3 | cut -d\" -f2}
- ${offset 22}ETC : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/ETC-USD/buy | cut -d\: -f3 | cut -d\" -f2}
+ ${font Open Sans:pixelsize=12}${color2}${offset 22}BTC : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/BTC-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.2f", $1}'}
+ ${offset 22}ETH : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/ETH-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.2f", $1}'}
+ ${offset 22}ETC : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/ETC-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.2f", $1}'}
${offset 22}XLM : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/XLM-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.3f", $1}'}
- ${offset 22}XRP : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/XRP-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.3f", $1}'}${color}
- ${offset 22}${color1}XAU : ${offset 10}${execi 600 printf "%.2f" "$(curl -s https://forex-data-feed.swissquote.com/public-quotes/bboquotes/instrument/XAU/USD | cut -d\: -f9 | cut -d\" -f1)"}${color}
- ${offset 22}${color3}XAG : ${offset 10}${execi 600 printf "%.2f" "$(curl -s https://forex-data-feed.swissquote.com/public-quotes/bboquotes/instrument/XAG/USD | cut -d\: -f9 | cut -d\" -f1)"}${color}${font}
+ ${offset 22}XRP : ${offset 10}${execi 600 curl -s https://api.coinbase.com/v2/prices/XRP-USD/buy | cut -d\: -f3 | cut -d\" -f2 | awk '{printf "%.3f", $1}'}
+ ${color1}${offset 22}XAU : ${offset 10}${execi 600 curl -s https://forex-data-feed.swissquote.com/public-quotes/bboquotes/instrument/XAU/USD | cut -d\: -f9 | cut -d\" -f1 | awk '{printf "%.2f", $1}'}${color}
+ ${color3}${offset 22}XAG : ${offset 10}${execi 600 curl -s https://forex-data-feed.swissquote.com/public-quotes/bboquotes/instrument/XAG/USD | cut -d\: -f9 | cut -d\" -f1 | awk '{printf "%.2f", $1}'}${color}${font}
${goto 10}${hr}
]]