Clima (Esperanto for weather) is a simple plugin that displays the local weather conditions and temperature in your Tmux status line.
By default, the location is obtained automatically using your IP address. You can it set to a specific location using an
option @clima.location
Results are cached for 15 minutes by default.
The weather information is provided by OpenWeatherMap. To use this plugin you need a valid OpenWeather API key that can be request here.
An environment variable named OPEN_WEATHER_API_KEY
with the API key value
should be exported to use this plugin:
export OPEN_WEATHER_API_KEY="[API-KEY-VALUE]"
You can add this to your shell configuration or source it from any other file.
Make sure you have Tmux Plugin Manager and jq installed.
Then add the plugin to your ~/.tmux.conf
:
set -g @plugin 'vascomfnunes/tmux-clima'
Load the plugin with prefix + I
.
You can add #{clima}
to your status line configuration if it already exists.
For example:
set -g status-right "#{clima}"
Current weather details can be visualized using prefix + W
, which will display
a standard tmux message with additional weather details:
This plugin caches the weather by default for 15 minutes. You can set any other TTL value (in minutes) using the option:
set -g @clima_ttl <value_in_minutes>
Weather temperature unit can be configured through following option (default is 'metric')
set -g @clima_unit <metric | imperial | kelvin>
You can choose not to show the location in the statusbar with the following option:
set -g @clima_show_location 0
Set up your location using the following option, by default you will get the weather for your current location based on your IP address
set -g @clima_location "Melbourne"
By default it always show the location in the statusbar.
You can choose not to show the weather condition icon in the statusbar with the following option:
set -g @clima_show_icon 0
By default it always show the icon in the statusbar.
Icons are displayed by default using unicode symbols. If you are using a patched Nerd Font and prefer to use Nerd Icons:
set -g @clima_use_nerd_font 1
This plugin is licensed under the MIT license. For more information please refer to the LICENSE file.