Tmux plugin that displays weather forecast using wttr.in in the status bar.
The plugin introduces a new #{forecast} format.
Thanks to Rahul Rai for the inspiration, I just packaged it. 😉
Add #{forecast} to your existing status-right tmux option:
set -g status-right '#{forecast} | #H'You'll now see some information like so:
Partly cloudy +13°C ↘13km/h | AaronSB2
By default the format string used is %C+%t+%w, but you can override this with the @forecast-format option:
set -g @forecast-format %CRefer to wttr.in for format options.
Moreover a character limit is enforced, in order to avoid errors trashing your status bar. This limit defaults to 75, but you can increase/decrease it as you wish:
set -g @forecast-char-limit 30Installation with Tmux Plugin Manager (recommended)
Add plugin to the list of TPM plugins in .tmux.conf:
set -g @plugin 'aaronpowell/tmux-weather'Hit prefix + I to fetch the plugin and source it.
#{forecast} interpolation should now work.
Clone the repo:
$ git clone https://github.com/aaronpowell/tmux-weather ~/clone/pathAdd this line to the bottom of .tmux.conf:
run-shell ~/clone/path/weather.tmuxReload TMUX environment:
# type this in terminal
$ tmux source-file ~/.tmux.conf#{forecast} interpolation should now work.