Giter Site home page Giter Site logo

josegpt / display-wttr Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 1.0 124 KB

[MOVED to https://git.sr.ht/~josegpt/display-wttr] Display wttr(weather) in the mode line 🌧️.

License: GNU General Public License v3.0

Emacs Lisp 88.53% Shell 11.47%
emacs mode-line wttrin weather emacs-mode-line emacs-lisp melpa

display-wttr's Introduction

display-wttr.el

https://melpa.org/packages/display-wttr-badge.svg https://stable.melpa.org/packages/display-wttr-badge.svg

Display wttr(weather) in the mode line 🌧️.

Screenshot

Emacs with emoji support >=Emacs 28

./emoji-display-wttr.png Emacs without emoji support <=Emacs 27.2

./no-emoji-display-wttr.png

Installation

MELPA

(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.

Manual

Download display-wttr.el to your local directory.

Git

git clone https://github.com/josegpt/display-wttr

Curl

curl -s -o display-wttr.el https://raw.githubusercontent.com/josegpt/display-wttr/main/display-wttr.el

Configuration

use-package

(use-package display-wttr
  ;; :custom
  ;; (display-wttr-format "4")
  ;; (display-wttr-locations '(""))
  ;; (display-wttr-interval (* 60 60))
  :config
  (display-wttr-mode))

Manual

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)

display-wttr's People

Contributors

josegpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

emacsmirror

display-wttr's Issues

Image-mode buffers change non-ASCII symbols in mode-line

After activating display-wttr-mode, when I navigate to image-mode or pdf-view buffers (which use Image-mode under the hood), some icons like the Sun symbol will be changed to another font.

20220822-224654
20220822-224727

I've raised this issue on #emacs but was unable to get any help. I'd like to know if you can reproduce this. I have Noto Color Emoji installed as the fontset font and Iosevka as the default font in Emacs.

The following are the steps to reproduce the issue:

  1. Start a fresh Emacs with emacs -Q.
  2. Install display-wttr from Melpa as per the project README.
  3. Configure display-wttr with the following.
(display-wttr-mode)
 (with-eval-after-load 'display-wttr
   (custom-set-variables
     '(display-wttr-format "%c %t")))
  1. Install and set the fontset default font.
(set-fontset-font t 'symbol "Noto Color Emoji" nil 'append)
(set-fontset-font "fontset-default" nil (font-spec :name "Noto Color Emoji"))
(set-fontset-font t 'unicode "Noto Color Emoji" nil 'append)
(setq use-default-font-for-symbols nil)
  1. Navigate to a file image (in my case, a .png)
  2. Encounter the error shown by the screenshots.

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.