Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 1.9 KB

README.md

File metadata and controls

78 lines (56 loc) · 1.9 KB

Waybar Wise FX Rate

Waybar module to get the FX rate between two currencies using the Wise API.

Example output in Waybar:

17.62 USD/MXN

Getting Started

Get your Wise API Key

In order for this to work, you need to provide your Wise API Key.

  1. Log in to wise.
  2. Go to: Profile -> Settings -> Developer tools -> API tokens.
  3. Add new token
    1. Name: Waybar Wise FX Rate.
    2. Token permissions: Read only <- Very important!!
    3. Click Create token.
  4. Copy your token

Compile and install the binary

# Clone the repo
git clone https://github.com/rlopzc/waybar-wise-fx-rate.git

cd waybar-wise-fx-rate

# Build the binary
zig build --release=fast

The binary will be in zig-out/bin/waybar-wise-fx-rate.

Symlink it to your ~/.local/bin. Replace <your-path-to-project-dir> with the dir where you cloned the repository.

ln -s $HOME/<path-to-project-dir>/zig-out/bin/waybar-wise-fx-rate ~/.local/bin/waybar-wise-fx-rate

Downloading binary from Releases

Currently built for:

  • x86_64-linux
  • aarch64-linux
  • arm-linux
  1. Check your architecture.
  2. Download it with curl -L https://github.com/rlopzc/waybar-wise-fx-rate/releases/latest/download/waybar-wise-fx-rate-x86_64-linux > waybar-wise-fx-rate.
  3. Make it executable chmod +x ./waybar-wise-fx-rate.
  4. Symlink it with: ln -s $HOME/<download-dir>/waybar-wise-fx-rate ~/.local/bin/waybar-wise-fx-rate.

Replace the architecture with yours.

Using the Waybar module

CLI Arguments.

  • --apikey. Wise API key.
  • --source. Source Currency supported by Wise.
  • --target. Target Currency supported by Wise.

Add a custom module to your waybar config:

"custom/wise-fx-rate": {
  "format": "{} {icon}",
  "return-type": "json",
  "format-icons": {
    "default": "$"
  },
  "exec": "waybar-wise-fx-rate --apikey <wise-api-key> --source <source> --target <target>",
  "interval": 60
}