Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josegpt/display-wttr
[MOVED to https://git.sr.ht/~josegpt/display-wttr] Display wttr(weather) in the mode line 🌧️.
https://github.com/josegpt/display-wttr
emacs emacs-lisp emacs-mode-line melpa mode-line weather wttrin
Last synced: 3 months ago
JSON representation
[MOVED to https://git.sr.ht/~josegpt/display-wttr] Display wttr(weather) in the mode line 🌧️.
- Host: GitHub
- URL: https://github.com/josegpt/display-wttr
- Owner: josegpt
- License: gpl-3.0
- Created: 2022-02-27T16:19:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-02T14:26:26.000Z (over 2 years ago)
- Last Synced: 2024-01-29T12:06:37.338Z (about 1 year ago)
- Topics: emacs, emacs-lisp, emacs-mode-line, melpa, mode-line, weather, wttrin
- Language: Emacs Lisp
- Homepage:
- Size: 121 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+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