dwm-bar for archlinux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
594 B

  1. #!/bin/sh
  2. # A dwm_bar function to print the rate of CURRENCY/USD from rate.sx using rate.sx/1CURRENCY
  3. # Creator of the project: Joe Standring <git@joestandring.com>
  4. # Additional plugin added by Brayan de Albuquerque <brayandealbuquerque@gmail.com>
  5. # GNU GPLv3
  6. # Dependencies: curl
  7. # Change the value of CURRENCY to match your currency code
  8. dwm_currency() {
  9. CURRENCY=EUR
  10. printf "%s" "$SEP1"
  11. if [ "$IDENTIFIER" = "unicode" ]; then
  12. printf "%s" "$(curl -s rate.sx/1$CURRENCY)"
  13. else
  14. printf "%s %.5s" "$CURRENCY" "$(curl -s rate.sx/1$CURRENCY)"
  15. fi
  16. printf "%s\n" "$SEP2"
  17. }
  18. dwm_currency