display-wttr
display-wttr copied to clipboard
[MOVED to https://git.sr.ht/~josegpt/display-wttr] Display wttr(weather) in the mode line 🌧️.
#+TITLE: display-wttr.el #+AUTHOR: Jose G Perez Taveras [[https://melpa.org/#/display-wttr][file:https://melpa.org/packages/display-wttr-badge.svg]] [[https://stable.melpa.org/#/display-wttr][file:https://stable.melpa.org/packages/display-wttr-badge.svg]]
Display wttr(weather) in the mode line 🌧️.
-
Screenshot =Emacs with emoji support >=Emacs 28= #+CAPTION: emoji-display-wttr #+NAME: emoji-display-wttr [[./emoji-display-wttr.png]] =Emacs without emoji support <=Emacs 27.2= #+CAPTION: no-emoji-display-wttr #+NAME: no-emoji-display-wttr [[./no-emoji-display-wttr.png]]
-
Installation ** MELPA #+BEGIN_SRC emacs-lisp (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) #+END_SRC Then use M-x package-install RET =display-wttr= RET to install the package. ** Manual Download =display-wttr.el= to your local directory. *** Git #+BEGIN_SRC shell git clone https://github.com/josegpt/display-wttr #+END_SRC *** Curl #+BEGIN_SRC shell curl -s -o display-wttr.el https://raw.githubusercontent.com/josegpt/display-wttr/main/display-wttr.el #+END_SRC
-
Configuration ** use-package #+BEGIN_SRC emacs-lisp (use-package display-wttr ;; :custom ;; (display-wttr-format "4") ;; (display-wttr-locations '("")) ;; (display-wttr-interval (* 60 60)) :config (display-wttr-mode)) #+END_SRC ** Manual Then add the =display-wttr.el= path to your Emacs =load-path= and add the following to your Emacs config. #+BEGIN_SRC emacs-lisp (add-to-list 'load-path "~/emacs/path")
;; If you omit the location name, you will get the report ;; for your current location based on your IP address. ;; (setq display-wttr-locations '("New+York")) ;; (setq display-wttr-locations '("London" "New+York")) ;; (setq display-wttr-locations '("London:New+York"))
;; display-wttr supports any format from one-line output ;; https://github.com/chubin/wttr.in#one-line-output ;; (setq display-wttr-format "4") ; New York, United States: ☀️ 🌡️+28°F 🌬️→7mph ;; (setq display-wttr-format "%l:+%c+%t") ; New York, New York, United States: ☀️ +28°F ;; (setq display-wttr-format "%C:+%t+%f+%w") ; Sunny: +28°F +28°F 0mph
;; Interval in which display-wttr.el will be updated. ;; (setq display-wttr-interval (* 60 60)) (display-wttr-mode 1) #+END_SRC