Weather in your terminal! This binary updates a .weatherterm
file in your home directory that can be used in your terminal.
- OpenWeatherMap API key
weatherterm
binary running in the background preferably as a service
The install subcommand will create a plist service file. You will need to load and run it.
weatherterm run -country US -city Miami -key 0000000000000000000 -unit imperial
launchctl load -w ~/Library/LaunchAgents/com.weatherterm.plist
launchctl start -w ~/Library/LaunchAgents/com.weatherterm.plist
In your .zshrc file add the following lines...
POWERLEVEL9K_CUSTOM_WEATHER="prompt_weather"
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(custom_weather)
function prompt_weather() {
echo "$(cat "${HOME}/.weatherterm")"
}
weatherterm run -country US -city Miami -key 0000000000000000000 -unit imperial
^C
cat ~/.weather
🌡 0.82 ⛅ 💨 7.72m/s SSW