Code Monkey home page Code Monkey logo

emacs-wttrin's Introduction

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

emacs-wttrin's People

Contributors

bcbcarl avatar chen-chao avatar davep avatar emacsist avatar kuanyui avatar syohex avatar xuchunyang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.