chen-chao / emacs-wttrin

Emacs frontend for weather web service wttr.in.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MELPA MELPA Stable Gitter Build Status

wttrin.el

Emacs frontend for weather web service wttr.in.

Usage

show in a buffer

Set a default cities list for completion:

(setq wttrin-default-cities '("Taipei" "Tainan"))

You can also specify default HTTP request Header for Accept-Language:

(setq wttrin-default-accept-language '("Accept-Language" . "zh-TW"))

Then run M-x wttrin to get the information.

When the weather is displayed you can press q to quit the buffer or g to query for another city.

screenshot

show in the mode line

You can also choose to show the weather information in the mode line(only works in Emacs 26.1+ for thread support):

(setq wttrin-mode-line-city "Taipei") ;; nil for automatically chosen by wttr.in
(setq wttrin-mode-line-time-interval 3600) ;; updating interval in seconds 
(wttrin-display-weather-in-mode-line)

The query will run in a thread silently. You should have fonts that supported unicode emojis installed to show the unicode weather characters correctly. Consider Symbola if you don't have one.

Specify wttrin-mode-line-format to change the one-line output format of wttr.in, see wttr.in#one-line-output.

LICENSE

MIT

About

Emacs frontend for weather web service wttr.in.

License:MIT License


Languages

Language:Emacs Lisp 99.1%Language:Shell 0.9%