Display wttr(weather) in the mode line 🌧️.
Emacs with emoji support >=Emacs 28
Emacs without emoji support <=Emacs 27.2
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
Then use M-x package-install RET display-wttr
RET to install the
package.
Download display-wttr.el
to your local directory.
git clone https://github.com/josegpt/display-wttr
curl -s -o display-wttr.el https://raw.githubusercontent.com/josegpt/display-wttr/main/display-wttr.el
(use-package display-wttr
;; :custom
;; (display-wttr-format "4")
;; (display-wttr-locations '(""))
;; (display-wttr-interval (* 60 60))
:config
(display-wttr-mode))
Then add the display-wttr.el
path to your Emacs load-path
and add the following to your Emacs config.
(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)