Skip to content

Emacs frontend for weather web service wttr.in.

License

Notifications You must be signed in to change notification settings

chen-chao/emacs-wttrin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 99.1%
  • Shell 0.9%